Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ariaPublic

ARIA IDL updates: convert eligible attributes to enumerated, new ARIA IDL guidance and examples#2413

Closed
rahimabdi wants to merge 37 commits intomainfrom
rahim/aria-idl-2025-updates
Closed

ARIA IDL updates: convert eligible attributes to enumerated, new ARIA IDL guidance and examples#2413
rahimabdi wants to merge 37 commits intomainfrom
rahim/aria-idl-2025-updates

Conversation

@rahimabdi
Copy link
Contributor

@rahimabdirahimabdi commentedJan 24, 2025
edited by pr-previewbot
Loading

Closes#2281
Closes#2279

  • add enumerated attribute definitions for the following attributes including missing value default, invalid value default, keywords/states and canonical keyword:
    • aria-atomic
    • aria-autocomplete
    • aria-busy
    • aria-checked
    • aria-current
    • aria-disabled
    • aria-expanded
    • aria-haspopup
    • aria-hidden
    • aria-invalid
    • aria-live
    • aria-modal
    • aria-multiline
    • aria-multiselectable
    • aria-orientation
    • aria-pressed
    • aria-readonly
    • aria-required
    • aria-selected
    • aria-sort
  • Revise "A. Mapping WAI-ARIA Value types to languages" to include enumerated attributes
  • Revise "6.2.4 Value" for permissible values (remove all other types except "enumerated"?)
  • Update "6.3 ARIA Attributes"
    • Remove obsolete note in "6.3.4 ARIA nullable DOMString Attributes" about ARIA transitioning to non-nullable DOMString?
    • Remote spec guidance around getting/setting to only apply to non-enumerated attributes
    • Provide updated examples for "6.3.4.1 Example Attribute Usage"

Test, Documentation and Implementation tracking

Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.


Preview |Diff

@netlify
Copy link

netlifybot commentedJan 24, 2025
edited
Loading

Deploy Preview forwai-aria ready!

NameLink
🔨 Latest commit509091f
🔍 Latest deploy loghttps://app.netlify.com/sites/wai-aria/deploys/67b2de791f08e600088e8a21
😎 Deploy Previewhttps://deploy-preview-2413--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@rahimabdirahimabdi changed the titleARIA IDL updates (adding keywords/states and missing/invalid values defaults)ARIA IDL updates: add keywords/states and missing/invalid values defaults for eligible attributesFeb 16, 2025
@rahimabdirahimabdi changed the titleARIA IDL updates: add keywords/states and missing/invalid values defaults for eligible attributesARIA IDL updates: convert eligible attributes to enumeratedFeb 17, 2025
Rahim Abdi added22 commitsFebruary 16, 2025 19:52
@rahimabdirahimabdi changed the titleARIA IDL updates: convert eligible attributes to enumeratedARIA IDL updates: convert eligible attributes to enumerated, update IDL guidance and examplesFeb 17, 2025
@rahimabdirahimabdi changed the titleARIA IDL updates: convert eligible attributes to enumerated, update IDL guidance and examplesARIA IDL updates: convert eligible attributes to enumerated, new ARIA IDL guidance and examplesFeb 17, 2025
@rahimabdirahimabdi marked this pull request as ready for reviewFebruary 19, 2025 00:14
@rahimabdirahimabdi added Agenda and removed Agenda labelsFeb 19, 2025
@rahimabdirahimabdi marked this pull request as draftFebruary 19, 2025 21:37
@rahimabdirahimabdi marked this pull request as ready for reviewFebruary 26, 2025 22:34
@rahimabdi
Copy link
ContributorAuthor

Adding this PR for discussion at the Feb 27 2025 ARIA WG meeting.

@cookiecrookcookiecrook self-requested a reviewFebruary 26, 2025 23:08
Copy link
Member

@keithamuskeithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@rahimabdi I've left a couple of review notes which I think apply in a lot of places, but rather than inundating you with review comments hopefully you can take the couple here and pattern match across the rest of the spec.

</tr>
</tbody>
</table>
<p>The attribute's <a data-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> and <a data-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Missing state.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

HTML has a concept of states that don't map to a keyword, but each state must have a definition, the definition allows mapping back to a keyword, or null. As an example thepopover attribute has a missing value default ofno-popover state which let's the spec say things like "if the popover attribute is in the no-popover state".

Additionally, traditional enumerated attributes will map an invalid state back to a particular keyword; for examplepopover's invalid attribute state is themanual state, which maps to the keyword"manual". It's important to know what the invalid state maps back to because it determines what value is returned in the IDL for those values.

Note: not all missing values return null (e.g. thekind attribute on<track> elements has a missing value default of the subtitles state, so a track's.kind property returns"subtitles" even if the attribute is not present, another example is thetype attribute on<input> which defaults to"text").

With that said it's possible to be in "no state". In fact, an enumerated attribute without a missing value default will be in "no state", as will invalid. No state, AIUI, will always map to null.

So here, the simplest thing for us to do here, rather than the implied missing state is to remove this, and lean on thelack of a missing/invalid state returning the no state. IOW this line could simply be removed:

Suggested change
<p>The attribute's <a data-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> and <a data-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Missing state.</p>

If you think missing the definitions create more ambiguity, then we can instead do something like:

Suggested change
<p>The attribute's<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a>and<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Missing state.</p>
<p>The attribute has no<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a>or<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a>.</p>

</tr>
</tbody>
</table>
<p>The attribute's <a data-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> and <a data-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Undefined state.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The<tr> for the"undefined" keyword is missing a<th> to name its state. In other words there should be a line above L10848 with<th scope="row">Undefined</th>. (I cannot comment on L10848 sadly).

I don't think we want the missing value default here to return the Undefined state, that will mean the.ariaChecked property will return"undefined" whenaria-checked isn't on the element. I presume we want to returnnull instead? Browsers currently return null, so missing should be "no state", i.e. removed:

Suggested change
<p>The attribute's<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> and<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Undefined state.</p>
<p>The attribute has no<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> and its<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> are both the Undefined state.</p>

Copy link
ContributorAuthor

@rahimabdirahimabdiMar 23, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Partially fixed in new PR (spacing, but not missing value default):https://github.com/w3c/aria/pull/2484/files.

<tr>
<th scope="col">Value</th>
<th scope="col">Value (keyword)</th>
<th scope="col">State</th>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks like a mix of tabs/spaces here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed in new PR:#2484.

</tr>
</tbody>
</table>
<p>The attribute's <a data-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> is the Undefined state, and its <a data-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> is the Menu state.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Again, here, the missing value default being theUndefined state means.ariaHasPopup will return"undefined" which I don't think is desirable. Instead:

Suggested change
<p>The attribute's<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a> is the Undefined state, and its<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> is the Menu state.</p>
<p>The attribute has no<adata-cite="html/common-microsyntaxes.html#missing-value-default">missing value default</a>, and its<adata-cite="html/common-microsyntaxes.html#invalid-value-default">invalid value default</a> is the Menu state.</p>

@spectranaut
Copy link
Contributor

Discussed briefly in today's ARIA meeting:https://www.w3.org/2025/03/06-aria-minutes#cd2e

@pkra
Copy link
Member

pkra commentedMar 7, 2025

@rahimabdi I'm unable to help since this is on your fork. This looks like it will be a bit messy - very sorry!

@rahimabdi
Copy link
ContributorAuthor

@pkra Would it be easier to create a fresh branch from current main? I can re-do all of the updates and copy over the comments.

@pkra
Copy link
Member

@pkra Would it be easier to create a fresh branch from current main? I can re-do all of the updates and copy over the comments.

@rahimabdi I suspect the answer is yes. Sorry again, also to@keithamus for creating additional review work.

@rahimabdi
Copy link
ContributorAuthor

@pkra No worries, thanks!

@rahimabdi
Copy link
ContributorAuthor

As this PR precedes substantial spec style sheet work (#2410), I've opened a new PR branched from current main:#2484.

Closing.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pkrapkrapkra requested changes

@keithamuskeithamuskeithamus requested changes

@cookiecrookcookiecrookAwaiting requested review from cookiecrook

@spectranautspectranautAwaiting requested review from spectranaut

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

4 participants

@rahimabdi@spectranaut@pkra@keithamus

Comments


[8]ページ先頭

©2009-2026 Movatter.jp