feat: implement ARIA string reflection on Element (#32080)

* feat: implement ARIA string reflection

* Update components/script/dom/element.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* fix: respond to PR comments

* fix: make functions non-public

* fix: use proper ARIAMixin mixin

* fix: tidy issues

* fix: double newline at end of file

* fix: move role before aria-* to match spec order

* fix: fix link to spec and format as spec does

* fix: delete now-passing WPT tests

* fix: remove legacy-layout test

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Nolan Lawson 2024-04-27 09:31:32 -07:00 committed by GitHub
parent 66563ed027
commit 02b3dd0b61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 433 additions and 708 deletions

View file

@ -1,228 +0,0 @@
[AriaMixin-string-attributes.html]
[ariaAtomic on Element must enqueue an attributeChanged reaction when adding aria-atomic content attribute]
expected: FAIL
[ariaAtomic on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaAutoComplete on Element must enqueue an attributeChanged reaction when adding aria-autocomplete content attribute]
expected: FAIL
[ariaAutoComplete on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaBusy on Element must enqueue an attributeChanged reaction when adding aria-busy content attribute]
expected: FAIL
[ariaBusy on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaChecked on Element must enqueue an attributeChanged reaction when adding aria-checked content attribute]
expected: FAIL
[ariaChecked on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColCount on Element must enqueue an attributeChanged reaction when adding aria-colcount content attribute]
expected: FAIL
[ariaColCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColIndex on Element must enqueue an attributeChanged reaction when adding aria-colindex content attribute]
expected: FAIL
[ariaColIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColSpan on Element must enqueue an attributeChanged reaction when adding aria-colspan content attribute]
expected: FAIL
[ariaColSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaCurrent on Element must enqueue an attributeChanged reaction when adding aria-current content attribute]
expected: FAIL
[ariaCurrent on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaDisabled on Element must enqueue an attributeChanged reaction when adding aria-disabled content attribute]
expected: FAIL
[ariaDisabled on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaExpanded on Element must enqueue an attributeChanged reaction when adding aria-expanded content attribute]
expected: FAIL
[ariaExpanded on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaHasPopup on Element must enqueue an attributeChanged reaction when adding aria-haspopup content attribute]
expected: FAIL
[ariaHasPopup on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaHidden on Element must enqueue an attributeChanged reaction when adding aria-hidden content attribute]
expected: FAIL
[ariaHidden on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaInvalid on Element must enqueue an attributeChanged reaction when adding aria-invalid content attribute]
expected: FAIL
[ariaInvalid on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when adding aria-keyshortcuts content attribute]
expected: FAIL
[ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLabel on Element must enqueue an attributeChanged reaction when adding aria-label content attribute]
expected: FAIL
[ariaLabel on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLevel on Element must enqueue an attributeChanged reaction when adding aria-level content attribute]
expected: FAIL
[ariaLevel on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLive on Element must enqueue an attributeChanged reaction when adding aria-live content attribute]
expected: FAIL
[ariaLive on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaModal on Element must enqueue an attributeChanged reaction when adding aria-modal content attribute]
expected: FAIL
[ariaModal on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaMultiLine on Element must enqueue an attributeChanged reaction when adding aria-multiline content attribute]
expected: FAIL
[ariaMultiLine on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaMultiSelectable on Element must enqueue an attributeChanged reaction when adding aria-multiselectable content attribute]
expected: FAIL
[ariaMultiSelectable on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaOrientation on Element must enqueue an attributeChanged reaction when adding aria-orientation content attribute]
expected: FAIL
[ariaOrientation on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPlaceholder on Element must enqueue an attributeChanged reaction when adding aria-placeholder content attribute]
expected: FAIL
[ariaPlaceholder on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPosInSet on Element must enqueue an attributeChanged reaction when adding aria-posinset content attribute]
expected: FAIL
[ariaPosInSet on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPressed on Element must enqueue an attributeChanged reaction when adding aria-pressed content attribute]
expected: FAIL
[ariaPressed on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaReadOnly on Element must enqueue an attributeChanged reaction when adding aria-readonly content attribute]
expected: FAIL
[ariaReadOnly on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRelevant on Element must enqueue an attributeChanged reaction when adding aria-relevant content attribute]
expected: FAIL
[ariaRelevant on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRequired on Element must enqueue an attributeChanged reaction when adding aria-required content attribute]
expected: FAIL
[ariaRequired on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRoleDescription on Element must enqueue an attributeChanged reaction when adding aria-roledescription content attribute]
expected: FAIL
[ariaRoleDescription on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowCount on Element must enqueue an attributeChanged reaction when adding aria-rowcount content attribute]
expected: FAIL
[ariaRowCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowIndex on Element must enqueue an attributeChanged reaction when adding aria-rowindex content attribute]
expected: FAIL
[ariaRowIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowSpan on Element must enqueue an attributeChanged reaction when adding aria-rowspan content attribute]
expected: FAIL
[ariaRowSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSelected on Element must enqueue an attributeChanged reaction when adding aria-selected content attribute]
expected: FAIL
[ariaSelected on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSetSize on Element must enqueue an attributeChanged reaction when adding aria-setsize content attribute]
expected: FAIL
[ariaSetSize on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSort on Element must enqueue an attributeChanged reaction when adding aria-sort content attribute]
expected: FAIL
[ariaSort on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueMax on Element must enqueue an attributeChanged reaction when adding aria-valuemax content attribute]
expected: FAIL
[ariaValueMax on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueMin on Element must enqueue an attributeChanged reaction when adding aria-valuemin content attribute]
expected: FAIL
[ariaValueMin on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueNow on Element must enqueue an attributeChanged reaction when adding aria-valuenow content attribute]
expected: FAIL
[ariaValueNow on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueText on Element must enqueue an attributeChanged reaction when adding aria-valuetext content attribute]
expected: FAIL
[ariaValueText on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL

View file

@ -1,126 +0,0 @@
[aria-attribute-reflection.html]
[role attribute reflects.]
expected: FAIL
[aria-atomic attribute reflects.]
expected: FAIL
[aria-autocomplete attribute reflects.]
expected: FAIL
[aria-busy attribute reflects.]
expected: FAIL
[aria-checked attribute reflects.]
expected: FAIL
[aria-colcount attribute reflects.]
expected: FAIL
[aria-colindex attribute reflects.]
expected: FAIL
[aria-colspan attribute reflects.]
expected: FAIL
[aria-current attribute reflects.]
expected: FAIL
[aria-description attribute reflects.]
expected: FAIL
[aria-disabled attribute reflects.]
expected: FAIL
[aria-expanded attribute reflects.]
expected: FAIL
[aria-haspopup attribute reflects.]
expected: FAIL
[aria-hidden attribute reflects.]
expected: FAIL
[aria-invalid attribute reflects.]
expected: FAIL
[aria-keyshortcuts attribute reflects.]
expected: FAIL
[aria-label attribute reflects.]
expected: FAIL
[aria-level attribute reflects.]
expected: FAIL
[aria-live attribute reflects.]
expected: FAIL
[aria-modal attribute reflects.]
expected: FAIL
[aria-multiline attribute reflects.]
expected: FAIL
[aria-multiselectable attribute reflects.]
expected: FAIL
[aria-orientation attribute reflects.]
expected: FAIL
[aria-placeholder attribute reflects.]
expected: FAIL
[aria-posinset attribute reflects.]
expected: FAIL
[aria-pressed attribute reflects.]
expected: FAIL
[aria-readonly attribute reflects.]
expected: FAIL
[aria-relevant attribute reflects.]
expected: FAIL
[aria-required attribute reflects.]
expected: FAIL
[aria-roledescription attribute reflects.]
expected: FAIL
[aria-rowcount attribute reflects.]
expected: FAIL
[aria-rowindex attribute reflects.]
expected: FAIL
[aria-rowspan attribute reflects.]
expected: FAIL
[aria-selected attribute reflects.]
expected: FAIL
[aria-setsize attribute reflects.]
expected: FAIL
[aria-sort attribute reflects.]
expected: FAIL
[aria-valuemax attribute reflects.]
expected: FAIL
[aria-valuemin attribute reflects.]
expected: FAIL
[aria-valuenow attribute reflects.]
expected: FAIL
[aria-valuetext attribute reflects.]
expected: FAIL
[aria-braillelabel attribute reflects.]
expected: FAIL
[aria-brailleroledescription attribute reflects.]
expected: FAIL

View file

@ -1,228 +0,0 @@
[AriaMixin-string-attributes.html]
[ariaAtomic on Element must enqueue an attributeChanged reaction when adding aria-atomic content attribute]
expected: FAIL
[ariaAtomic on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaAutoComplete on Element must enqueue an attributeChanged reaction when adding aria-autocomplete content attribute]
expected: FAIL
[ariaAutoComplete on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaBusy on Element must enqueue an attributeChanged reaction when adding aria-busy content attribute]
expected: FAIL
[ariaBusy on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaChecked on Element must enqueue an attributeChanged reaction when adding aria-checked content attribute]
expected: FAIL
[ariaChecked on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColCount on Element must enqueue an attributeChanged reaction when adding aria-colcount content attribute]
expected: FAIL
[ariaColCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColIndex on Element must enqueue an attributeChanged reaction when adding aria-colindex content attribute]
expected: FAIL
[ariaColIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaColSpan on Element must enqueue an attributeChanged reaction when adding aria-colspan content attribute]
expected: FAIL
[ariaColSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaCurrent on Element must enqueue an attributeChanged reaction when adding aria-current content attribute]
expected: FAIL
[ariaCurrent on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaDisabled on Element must enqueue an attributeChanged reaction when adding aria-disabled content attribute]
expected: FAIL
[ariaDisabled on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaExpanded on Element must enqueue an attributeChanged reaction when adding aria-expanded content attribute]
expected: FAIL
[ariaExpanded on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaHasPopup on Element must enqueue an attributeChanged reaction when adding aria-haspopup content attribute]
expected: FAIL
[ariaHasPopup on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaHidden on Element must enqueue an attributeChanged reaction when adding aria-hidden content attribute]
expected: FAIL
[ariaHidden on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaInvalid on Element must enqueue an attributeChanged reaction when adding aria-invalid content attribute]
expected: FAIL
[ariaInvalid on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when adding aria-keyshortcuts content attribute]
expected: FAIL
[ariaKeyShortcuts on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLabel on Element must enqueue an attributeChanged reaction when adding aria-label content attribute]
expected: FAIL
[ariaLabel on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLevel on Element must enqueue an attributeChanged reaction when adding aria-level content attribute]
expected: FAIL
[ariaLevel on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaLive on Element must enqueue an attributeChanged reaction when adding aria-live content attribute]
expected: FAIL
[ariaLive on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaModal on Element must enqueue an attributeChanged reaction when adding aria-modal content attribute]
expected: FAIL
[ariaModal on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaMultiLine on Element must enqueue an attributeChanged reaction when adding aria-multiline content attribute]
expected: FAIL
[ariaMultiLine on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaMultiSelectable on Element must enqueue an attributeChanged reaction when adding aria-multiselectable content attribute]
expected: FAIL
[ariaMultiSelectable on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaOrientation on Element must enqueue an attributeChanged reaction when adding aria-orientation content attribute]
expected: FAIL
[ariaOrientation on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPlaceholder on Element must enqueue an attributeChanged reaction when adding aria-placeholder content attribute]
expected: FAIL
[ariaPlaceholder on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPosInSet on Element must enqueue an attributeChanged reaction when adding aria-posinset content attribute]
expected: FAIL
[ariaPosInSet on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaPressed on Element must enqueue an attributeChanged reaction when adding aria-pressed content attribute]
expected: FAIL
[ariaPressed on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaReadOnly on Element must enqueue an attributeChanged reaction when adding aria-readonly content attribute]
expected: FAIL
[ariaReadOnly on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRelevant on Element must enqueue an attributeChanged reaction when adding aria-relevant content attribute]
expected: FAIL
[ariaRelevant on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRequired on Element must enqueue an attributeChanged reaction when adding aria-required content attribute]
expected: FAIL
[ariaRequired on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRoleDescription on Element must enqueue an attributeChanged reaction when adding aria-roledescription content attribute]
expected: FAIL
[ariaRoleDescription on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowCount on Element must enqueue an attributeChanged reaction when adding aria-rowcount content attribute]
expected: FAIL
[ariaRowCount on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowIndex on Element must enqueue an attributeChanged reaction when adding aria-rowindex content attribute]
expected: FAIL
[ariaRowIndex on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaRowSpan on Element must enqueue an attributeChanged reaction when adding aria-rowspan content attribute]
expected: FAIL
[ariaRowSpan on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSelected on Element must enqueue an attributeChanged reaction when adding aria-selected content attribute]
expected: FAIL
[ariaSelected on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSetSize on Element must enqueue an attributeChanged reaction when adding aria-setsize content attribute]
expected: FAIL
[ariaSetSize on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaSort on Element must enqueue an attributeChanged reaction when adding aria-sort content attribute]
expected: FAIL
[ariaSort on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueMax on Element must enqueue an attributeChanged reaction when adding aria-valuemax content attribute]
expected: FAIL
[ariaValueMax on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueMin on Element must enqueue an attributeChanged reaction when adding aria-valuemin content attribute]
expected: FAIL
[ariaValueMin on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueNow on Element must enqueue an attributeChanged reaction when adding aria-valuenow content attribute]
expected: FAIL
[ariaValueNow on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL
[ariaValueText on Element must enqueue an attributeChanged reaction when adding aria-valuetext content attribute]
expected: FAIL
[ariaValueText on Element must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL

View file

@ -1,126 +0,0 @@
[aria-attribute-reflection.html]
[role attribute reflects.]
expected: FAIL
[aria-atomic attribute reflects.]
expected: FAIL
[aria-autocomplete attribute reflects.]
expected: FAIL
[aria-busy attribute reflects.]
expected: FAIL
[aria-checked attribute reflects.]
expected: FAIL
[aria-colcount attribute reflects.]
expected: FAIL
[aria-colindex attribute reflects.]
expected: FAIL
[aria-colspan attribute reflects.]
expected: FAIL
[aria-current attribute reflects.]
expected: FAIL
[aria-description attribute reflects.]
expected: FAIL
[aria-disabled attribute reflects.]
expected: FAIL
[aria-expanded attribute reflects.]
expected: FAIL
[aria-haspopup attribute reflects.]
expected: FAIL
[aria-hidden attribute reflects.]
expected: FAIL
[aria-invalid attribute reflects.]
expected: FAIL
[aria-keyshortcuts attribute reflects.]
expected: FAIL
[aria-label attribute reflects.]
expected: FAIL
[aria-level attribute reflects.]
expected: FAIL
[aria-live attribute reflects.]
expected: FAIL
[aria-modal attribute reflects.]
expected: FAIL
[aria-multiline attribute reflects.]
expected: FAIL
[aria-multiselectable attribute reflects.]
expected: FAIL
[aria-orientation attribute reflects.]
expected: FAIL
[aria-placeholder attribute reflects.]
expected: FAIL
[aria-posinset attribute reflects.]
expected: FAIL
[aria-pressed attribute reflects.]
expected: FAIL
[aria-readonly attribute reflects.]
expected: FAIL
[aria-relevant attribute reflects.]
expected: FAIL
[aria-required attribute reflects.]
expected: FAIL
[aria-roledescription attribute reflects.]
expected: FAIL
[aria-rowcount attribute reflects.]
expected: FAIL
[aria-rowindex attribute reflects.]
expected: FAIL
[aria-rowspan attribute reflects.]
expected: FAIL
[aria-selected attribute reflects.]
expected: FAIL
[aria-setsize attribute reflects.]
expected: FAIL
[aria-sort attribute reflects.]
expected: FAIL
[aria-valuemax attribute reflects.]
expected: FAIL
[aria-valuemin attribute reflects.]
expected: FAIL
[aria-valuenow attribute reflects.]
expected: FAIL
[aria-valuetext attribute reflects.]
expected: FAIL
[aria-braillelabel attribute reflects.]
expected: FAIL
[aria-brailleroledescription attribute reflects.]
expected: FAIL