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: enumerated attribute conversions, new "enumerated" wai-aria type, IDL examples#2484

Open
rahimabdi wants to merge 9 commits intomainfrom
rahim/update-aria-idl-2025
Open

ARIA IDL updates: enumerated attribute conversions, new "enumerated" wai-aria type, IDL examples#2484
rahimabdi wants to merge 9 commits intomainfrom
rahim/update-aria-idl-2025

Conversation

@rahimabdi
Copy link
Contributor

@rahimabdirahimabdi commentedMar 23, 2025
edited by pr-previewbot
Loading

Closes#2281
Closes#2279

Mini-Explainer

SeeARIA IDL updates mini-explainer.

Summary of Changes

  • Convert following ARIA attributes to enumerated:
    • 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 "Mapping WAI-ARIA Value types to languages" to include enumerated attributes
  • Revise "6.2.4 Value" value types
  • Update "6.3 ARIA Attributes" section
  • Remove obsolete note in "6.3.4 ARIA nullable DOMString Attributes" about ARIA transitioning to non-nullable DOMString?
  • Update ARIA IDL usage examples in "6.3.4.1 Example Attribute Usage"
  • Add note clarifying "Undefined" state vs. "undefined" string assignment

Feature Flag Testing in Safari Tech Preview

You can test the new ARIA IDL reflection behavior with a feature flag inSafari Tech Preview 228. Ensure that "Show features for developers" is enabled (Settings -> Advanced), and then enable the "Enumerated ARIA Attribute Reflection" flag (Settings -> Feature Flags, "JavaScript" section).

The following page can help with quick IDL testing:https://2553411.playcode.io.

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.

Meeting Notes

ARIA WG & Salesforce Sync (Sept 30 2025)

  • Presentation deck
  • Attendees
  • On the LWC side (Lightning Web Components), no anticipated impact unless testing reveals issues
    For first-party code, Salesforce framework doesn’t do significant normalization; primary areas of concern would be new behavior around null/undefined/default values
  • The Salesforce ARIA IDL polyfill is currently being removed, and it’s only there for backwards compatibility
  • There may be potential impact for code packages that aren’t being maintained. For customer code, need a way to communicate the changes (anticipating low impact); Salesforce to investigate an opt-in fallback behavior for those relying on old behavior
  • Next steps
    • Salesforce folks to regroup with the ARIA WG in mid-October after completion of impact analysis to LWC and Salesforce first-party code
    • Ideal to wait for Chrome/Firefox to ship the ARIA IDL changes behind a flag as well, and to maintain the flag so it can be toggled off if needed. The goal is to ensure webcompat, so the ARIA WG does not wish to rush the change

Preview |Diff

@netlify
Copy link

netlifybot commentedMar 23, 2025
edited
Loading

Deploy Preview forwai-aria ready!

NameLink
🔨 Latest commit5dc7486
🔍 Latest deploy loghttps://app.netlify.com/projects/wai-aria/deploys/68cf37fe7749bc000911808b
😎 Deploy Previewhttps://deploy-preview-2484--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 project configuration.

@rahimabdi
Copy link
ContributorAuthor

@keithamus:

@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.

Thanks! I'll review those comments (which are migrated to this PR now) and respond.

keithamus reacted with thumbs up emoji

@rahimabdi
Copy link
ContributorAuthor

@rahimabdirahimabdi marked this pull request as draftMarch 27, 2025 17:23
@rahimabdirahimabdi marked this pull request as ready for reviewApril 27, 2025 17:03
@rahimabdi
Copy link
ContributorAuthor

rahimabdi commentedApr 27, 2025
edited
Loading

CC@pkra@spectranaut@cookiecrook@keithamus@scottaohara@annevk

This PR is ready for review! I've made a number of updates, mainly:

  • Cleaned up enumerated attribute keywords/states per@keithamus's feedback
  • Changedaria-atomic's Missing state to Undefined, to align with other ARIA attributes that have an "Undefined" state
  • Added more IDL usage examples
  • Added a note clarifying that Undefined state is equivalent to "no state"

If helpful, I also created this tool to simulate how the new ARIA IDL works for enumerated attributes:https://rahimabdi.github.io/aria-idl-simulator/.

Copy link
Member

@annevkannevk left a comment

Choose a reason for hiding this comment

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

One thing that's nice in HTML is that all the states are a<dfn> and therefore also can be linked. But maybe that's best addressed in a follow-up.

index.html Outdated
Comment on lines 11941 to 11932
Some ARIA attributes support an Undefined state, which is equivalent to having no state (i.e., null). User agent implementations may omit the Undefined state since the lack of an explicit
state results in the same behavior. For more information about determining the state of enumerated attributes, see
Copy link
Member

Choose a reason for hiding this comment

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

I think this sentence adds more confusion than it resolves. Especially since you cannot just leave it out at the moment without hitting an assert.

cookiecrook reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

Part of this could be an informative note for authors/implementors, rather than in the normative text of the Enumerated Attribute definition.

Do we ever anticipate a time where the explicit "undefined" content attribute values would need to map to an Undefined state, separately than the Null state? For example, I think the only scenarios where anundefined is allowed are with theundefined/true/false/[/mixed] enumerated values, but since the Missing Default and Invalid Default are the same one those, there is no impact... Can we foresee any scenario where those would be different? For example, ifundefined was an allowed token value ofaria-invalid? (Presumably we just need to always avoid that, which seems okay.)

rahimabdi reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
ContributorAuthor

@rahimabdirahimabdiSep 20, 2025
edited
Loading

Choose a reason for hiding this comment

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

@annevk@cookiecrook Got it, I've removed this sentence: "User agent implementations may omit the Undefined state since the lack of an explicit state results in the same behavior."

@keithamus Hopefully the link to the HTML spec (which defines the state computation algorithm) is sufficient.

Do we ever anticipate a time where the explicit "undefined" content attribute values would need to map to an Undefined state, separately than the Null state? For example, I think the only scenarios where an undefined is allowed are with the undefined/true/false/[/mixed] enumerated values, but since the Missing Default and Invalid Default are the same one those, there is no impact... Can we foresee any scenario where those would be different? For example, if undefined was an allowed token value of aria-invalid? (Presumably we just need to always avoid that, which seems okay.)

As@keithamus also mentioned, the "undefined" content attribute value will map to the invalid value default (effectively treated as invalid), and fortunately there's no need for any ARIA attribute to have an explicit "undefined" keyword (nor an Undefined state mapping to "undefined" the keyword). I plan to add a note on this in this PR.

Here are all the attributes which currently support a value of "undefined" per spec, all mapping to their respective invalid value defaults and equivalent with behavior currently defined in spec:

  • aria-checked ("undefined" maps to null)
  • aria-expanded ("undefined" maps to null)
  • aria-hidden ("undefined" maps to False state)
  • aria-orientation ("undefined" maps to null)
  • aria-pressed ("undefined" maps to null)
  • aria-selected ("undefined" maps to null)

Note: Each of these 6 attributes also supports the empty string as a keyword, so"" and "undefined" are the same.

Only two enumerated ARIA attributes have differing invalid/missing value defaults and they don't support "undefined" however, any invalid value provided to them should result in a value of "true" per spec (now that they're enumerated, this is handled by the invalid value default):

  • aria-current
    • invalid value default = True state
    • missing value default = False state
  • aria-invalid
    • invalid value default = True state
    • missing value default = False state

Jarred-Sumner pushed a commit to oven-sh/WebKit that referenced this pull requestAug 29, 2025
https://bugs.webkit.org/show_bug.cgi?id=296851rdar://157952768Reviewed by Tyler Wilcock and Ryosuke Niwa.Adds 'status: developer' feature flag for enumerated ARIA attributes:w3c/aria#2484.The ARIA spec intends to convert the following attributes to be enumerated, i.e., content attributeswith permissible keywords and invalid/missing value defaults:- 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-sortThis PR changes ARIA's IDL to use [ReflectSetter] for enumerated attributes in order to implement the desired reflectionbehavior behind a flag using manual getters; this also allows maintaining current ARIA IDL behavior when the flag is disabled.When ARIA PRWebKit#2484 lands, ARIA's IDL should be updated to use [Reflect, Enumerated] for automatic JS bindings codegenthat doesn't need manual code.* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:* Source/WebCore/accessibility/AriaAttributes.idl:* Source/WebCore/dom/Element.h:* Source/WebCore/dom/Element.cpp:(WebCore::Element::ariaAtomic const):(WebCore::Element::ariaAutoComplete const):(WebCore::Element::ariaBusy const):(WebCore::Element::ariaChecked const):(WebCore::Element::ariaCurrent const):(WebCore::Element::ariaDisabled const):(WebCore::Element::ariaExpanded const):(WebCore::Element::ariaHasPopup const):(WebCore::Element::ariaHidden const):(WebCore::Element::ariaInvalid const):(WebCore::Element::ariaLive const):(WebCore::Element::ariaModal const):(WebCore::Element::ariaMultiLine const):(WebCore::Element::ariaMultiSelectable const):(WebCore::Element::ariaOrientation const):(WebCore::Element::ariaPressed const):(WebCore::Element::ariaReadOnly const):(WebCore::Element::ariaRequired const):(WebCore::Element::ariaSelected const):(WebCore::Element::ariaSort const):* Tools/DumpRenderTree/TestOptions.cpp:* Tools/WebKitTestRunner/TestOptions.cpp:Canonical link:https://commits.webkit.org/299159@main
@rahimabdirahimabdiforce-pushed therahim/update-aria-idl-2025 branch fromb2ba05c to38a1bfcCompareSeptember 20, 2025 16:33
@github-project-automationgithub-project-automationbot moved this fromNeeds Review toWaiting For Implementation inARIA Normative PR TrackingSep 20, 2025
@rahimabdirahimabdi reopened thisSep 20, 2025
@rahimabdi
Copy link
ContributorAuthor

rahimabdi commentedSep 21, 2025
edited
Loading

I've made many updates to this PR addressing outstanding feedback. I've also updated the PR description with a link to an unofficial explainer, details on how to test (via Safari feature flag) and more.

I've also reached out to the Salesforce folks (thanks@gregwhitworth!) to follow up on any impact related to theirLWC ARIA polyfill.

I will Agenda+ to discuss these outstanding questions:

  • aria-haspopup questions
    • Mapping ofaria-haspopup: should "true" and "menu" be distinct states in terms of IDL?
    • Somebody asked whyaria-haspopup has a missing value default of null rather than "false". Is this correct?
  • Specifying undefined in the attribute Values table: does it look OK?
  • Feedback on the new "Relationship Between the Undefined State and "undefined" String Value" section
  • Should all ARIA enumerated attributes that support null be specified as an Undefined state? This question applies only toaria-atomic andaria-haspopup.
  • New empty value default as part ofHTML enumerated attribute definition. Any concerns with using this for ARIA attrs that support an empty string keyword?

@rahimabdi
Copy link
ContributorAuthor

rahimabdi commentedOct 1, 2025
edited
Loading

@keithamus@cookiecrook@rahimabdi met with the Salesforce team (@gregwhitworth and others) on Sept 30 2025 to discuss impact/risks for Salesforce frameworks, and to request testing. I've captured meeting notes/next steps in the "Meeting Notes" section in the PR description.

@spectranaut
Copy link
Contributor

Discussed Rahim's questions above in today's meeting:https://www.w3.org/2025/10/09-aria-minutes.html#31d8

@spectranautspectranaut moved this fromWaiting For Implementation toNeeds Review inARIA Normative PR TrackingOct 9, 2025
@spectranaut
Copy link
Contributor

@rahimabdi did all of your questions get answered?

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

Reviewers

@spectranautspectranautAwaiting requested review from spectranaut

@scottaoharascottaoharaAwaiting requested review from scottaohara

@cookiecrookcookiecrookAwaiting requested review from cookiecrook

@keithamuskeithamusAwaiting requested review from keithamus

@pkrapkraAwaiting requested review from pkra

@cynscynsAwaiting requested review from cyns

@annevkannevkAwaiting requested review from annevk

@gregwhitworthgregwhitworthAwaiting requested review from gregwhitworth

1 more reviewer

@nolanlawsonnolanlawsonnolanlawson left review comments

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

Projects

Status: Needs Review

Milestone

No milestone

9 participants

@rahimabdi@cyns@spectranaut@annevk@cookiecrook@keithamus@nolanlawson@pkra@gregwhitworth

Comments


[8]ページ先頭

©2009-2026 Movatter.jp