core-aam
core-aam copied to clipboard
Review UIA events for ARIA state/property changes
The following table reflects the event mapping currently in the Core AAM for UIA. I noticed some inconsistencies in how things are written and would like a review of the current values and corrections if needed.
| State or Property | UIA event |
|---|---|
| aria-activedescendant | See Focus Changes |
| aria-busy | PropertyChangedEvent |
| aria-checked | ToggleStateProperty as part of toggle pattern |
| aria-current | PropertyChangedEvent |
| aria-disabled | No event |
| aria-describedby | PropertyChangeEvent |
| aria-dropeffect | No event |
| aria-expanded | expand/collapse pattern events |
| aria-grabbed | No event |
| aria-hidden | StructureChangedEvent |
| aria-invalid | No event |
| aria-label and aria-labelledby | PropertyChangeEvent |
| aria-pressed | No event |
| aria-readonly | No event |
| aria-required | No event |
| aria-selected | See Selection |
| aria-valuenow | ValueProperty property change as part of value pattern |
| aria-valuetext | No event |
My questions:
- Several of the ARIA state/properties are mapped to "PropertyChangedEvent". Should the specific property be included in the mapping? As an example from ATK/AT-SPI2: if
aria-busychanges, the event isobject:state-changed:busybut ifaria-checkedchanges, the event isobject:state-changed:checked. aria-checkedandaria-valuenoware written as $PROPERTY property change as part of $PATTERN pattern. Are these property change events the same thing as PropertyChangedEvent, but written differently? Or are they totally different API?aria-expandedmentions "expand/collapse pattern events". Should we specify these by name/type?- Are all the "No event" instances correct?
@joanmarie well this seems to have been a very fruitful exercise. :)
I can submit a PR with updates for these questions, if that works?
Answers to questions:
- Sure, I think we can add the specific property to the notes on these events. Probably best to keep the same style as state and property table, e.g.
Property: AriaProperties, rather than give the full UIA property ID that's returned by the event handler (UIA_AriaPropertiesPropertyId). - Good catch, the correct event for "As part of __ pattern" would still be
PropertyChangedEvent, the properties referenced in the Core-AAM mapping table are what get returned. "As part of __ pattern" is still noteworthy for these events, and should be kept. - Yep, this is just another
PropertyChangedEvent, with a particular returned value for the expanded/collapsed state. - "No event" properties
aria-disabled,aria-dropeffect,aria-grabbed,aria-invalid,aria-pressed,aria-readonly,aria-required, andaria-valuetextall firePropertyChangedEvent.
Other changes:
aria-activedescendentfiresPropertyChangedEventin addition to the focus event in the Focus table.aria-hiddenfiresPropertyChangedEvent, in addition toStructuredChangedEvent.- In 5.8.3 Selection, Multiple selections table:
ElementAddedToSelectionorElementRemovedFromSelectionshould fire from the item, not the current container.
@melanierichards:
I can submit a PR with updates for these questions, if that works?
That doesn't just "work"; it would be super awesome! :smile: Thanks!!
I merged the change into master. We'll want to add tests before we merge it into stable. So leaving this open for now.
Thanks for doing this @melanierichards!
Sure thing, thanks @joanmarie!
@joanmarie @spectranaut - trying to merge things. Does this have tests?
I added tests here: https://github.com/web-platform-tests/wpt/pull/34797
And since this was a change to reflect the implementation, it looks ready to move to stable!