-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: amend breaking changes and reinstate constraints #515
fix: amend breaking changes and reinstate constraints #515
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9a036ef:
|
Pull Request Test Coverage Report for Build 5297714812
💛 - Coveralls |
Co-authored-by: Craig Morten <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I super appreciate the time and care put into this. Let's get this in and put out a minor release to revert the breakage. This is helping me better understand how downstream packages are using this package.
Hi @jessebeach! |
Thank you @MatanBobi! I will take you all up on this offer. |
Fixes #511
Fixes #512
Relates to testing-library/dom-testing-library#1239
Description
#447 brought in a number of breaking changes to this repo and was released under a minor version, namely:
constraints
array within related conceptsattributes
.This PR looks to partially revert some of these changes (with a few other unrelated corrections and additions) to provide an upgrade path to downstream packages, using the following as references:
In some places I have left the HTML-AAM additions where they could be considered non-breaking additive changes in line with discussion here. Open to changes where feel should keep some of the HTML-AAM changes. I think the key is to resolve (1) which has broken the likes of dom-testing-library.
Summary of changes
@babel/node
as a dev dep sonpm run output_as_hack
can be used.npx update-browserslist-db@latest
.section
element association fromsection
role as unable to find any references in any stable specs nor the HTML-AAM Working Draft.aria-controls
constraint oncombobox
role to fix input type="search" isn't considered of role "searchbox" #511.This is new in HTML-AAM Working Draft, but not in WAI-ARIA 1.2 nor HTML-ARIA W3C Recommendations.select
element constraints involvingmultiple
. I believe the spec has been misinterpreted asmultiple
being included in the condition regarding a number value. It is a boolean attribute so have corrected constraint wording.constraints
arrays for attributes, reverting it's removal in Audited and updated roles source of truth to HTML Accessibility API Mapping 1.0 #447. In some places additional attributeconstraints
were added to align to the spec.'ancestor table element has treegrid role'
constraint togridcell
role: "role=gridcell if the ancestor table element is exposed as a role=grid or treegrid". See https://www.w3.org/TR/html-aria/#docconformance.img
element specific conditions onalt
.aria-multiselectable
constraint ondatalist
forlistbox
role.This is new in HTML-AAM Working Draft, but not in WAI-ARIA 1.2 nor HTML-ARIA W3C Recommendations.listitem
related concept to themenuitem
role as per https://www.w3.org/TR/wai-aria-1.2/#menuitem.progressbar
role forprogress
element.This is new in HTML-AAM Working Draft, but not in WAI-ARIA 1.2 nor HTML-ARIA W3C Recommendations.button
related concept for theswitch
role. The related concept is for the ARIAbutton
not HTML, see https://www.w3.org/TR/wai-aria-1.2/#switch.Update 27/06/2023:
Some of the comments above are incorrect in hindsight (see w3c/html-aria#476 (comment)), specifically regarding constraints or concepts being "new" in HTML-AAM - this was a misinterpretation of the specification which is designed for implementors, not for authors. I have striked through the incorrect comments. Going forward the aria and html in aria specs should be used, not aam.