fix(existing-rule): aria-busy now shows an error message for a use with unallowed children#5017
Merged
chutchins25 merged 2 commits intoMar 4, 2026
Conversation
… children and shows a specific error message
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the aria-required-children check messaging so that when aria-busy is involved and unallowed children are present, the user receives a more specific failure message (per #4626 context).
Changes:
- Update the check evaluate logic to choose a different
messageKeywhenaria-busyis present. - Update/extend failure message strings to include the new
aria-busy-failmessage. - Update the unit test expectation for the unallowed-children +
aria-busy="true"case.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
lib/checks/aria/aria-required-children-evaluate.js |
Adds conditional messageKey selection for unallowed-children failures when aria-busy is present. |
lib/checks/aria/aria-required-children.json |
Adds the new fail.aria-busy-fail message string. |
locales/_template.json |
Adds the new aria-busy-fail message to the locale template output. |
test/checks/aria/required-children.js |
Updates the test to expect the new failure messageKey in the aria-busy="true" + unallowed child scenario. |
Comments suppressed due to low confidence (1)
lib/checks/aria/aria-required-children-evaluate.js:55
- The PR description/linked issue #4626 says
aria-required-children“should never fail if aria-busy=true is set”, but the check still returnsfalsewhenunallowed.length(even witharia-busy="true"), and the updated test asserts this failure. Please confirm the intended behavior; if the rule truly should not fail underaria-busy="true", the evaluate logic needs to bypass/soften theunallowedfailure when busy, or the PR/issue linkage should be updated.
if (unallowed.length) {
this.relatedNodes(unallowed.map(({ vNode }) => vNode));
const messageKey = virtualNode.hasAttr('aria-busy')
? 'aria-busy-fail'
: 'unallowed';
this.data({
messageKey,
values: unallowed
.map(({ vNode, attr }) => getUnallowedSelector(vNode, attr))
.filter((selector, index, array) => array.indexOf(selector) === index)
.join(', ')
});
return false;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
straker
approved these changes
Mar 3, 2026
WilcoFiers
approved these changes
Mar 3, 2026
WilcoFiers
pushed a commit
that referenced
this pull request
Mar 30, 2026
…th unallowed children (#5017) Updated existing rule for aria-required-children for cases where the aria-busy attribute is used. This now will show the user a specific error message regarding aria-busy with unallowed children instead of the one for used for other cases using unallowed children. Replaces PR: [5011](#5011) Closes: #4626
straker
pushed a commit
that referenced
this pull request
Mar 30, 2026
…th unallowed children (#5017) Updated existing rule for aria-required-children for cases where the aria-busy attribute is used. This now will show the user a specific error message regarding aria-busy with unallowed children instead of the one for used for other cases using unallowed children. Replaces PR: [5011](#5011) Closes: #4626
WilcoFiers
added a commit
that referenced
this pull request
Mar 31, 2026
### [4.11.2](v4.11.1...v4.11.2) (2026-03-30) ### Bug Fixes - **aria-valid-attr-value:** handle multiple aria-errormessage IDs ([#4973](#4973)) ([9322148](9322148)) - **aria:** prevent getOwnedVirtual from returning duplicate nodes ([#4987](#4987)) ([99d1e77](99d1e77)), closes [#4840](#4840) - **DqElement:** avoid calling constructors with cloneNode ([#5013](#5013)) ([88bc57f](88bc57f)) - **existing-rule:** aria-busy now shows an error message for a use with unallowed children ([#5017](#5017)) ([dded75a](dded75a)) - **scrollable-region-focusable:** clarify the issue is in safari ([#4995](#4995)) ([2567afd](2567afd)), closes [WebKit#190870](https://github.com/dequelabs/WebKit/issues/190870) [WebKit#277290](https://github.com/dequelabs/WebKit/issues/277290) - **scrollable-region-focusable:** do not fail scroll areas when all content is visible without scrolling ([#4993](#4993)) ([240f8b5](240f8b5)) - **target-size:** determine offset using clientRects if target is display:inline ([#5012](#5012)) ([69d81c1](69d81c1)) - **target-size:** ignore widgets that are inline with other inline elements ([#5000](#5000)) ([cf8a3c0](cf8a3c0))
WilcoFiers
added a commit
that referenced
this pull request
Jun 1, 2026
## [4.12.0](v4.11.4...v4.12.0) (2026-06-01) ### Features - add gather-internals.js external script ([#5099](#5099)) ([c61d58b](c61d58b)), closes [#5080](#5080) - **aria-allowed/prohibited-attr, aria-required-parent/children:** partially support element internals role ([#5080](#5080)) ([417b48a](417b48a)), closes [#5039](#5039) [#4259](#4259) - **axe.externalAPIs:** add public api for setting elementInternal data ([#5105](#5105)) ([63bab8f](63bab8f)) - **core:** expose normalizeRunOptions ([#4998](#4998)) ([b8e6a59](b8e6a59)) - expose axe.resetLocale() to restore the default locale ([#5108](#5108)) ([c2b5292](c2b5292)), closes [#5107](#5107) - **getRules:** include rule enabled state in returned objects ([#5118](#5118)) ([75bf772](75bf772)), closes [#5116](#5116) - **list,listitem:** support element internals role ([#5119](#5119)) ([7d9d696](7d9d696)) - **new-rule:** check that aria-tab have an accessible name ([#5001](#5001)) ([0d4e4e7](0d4e4e7)), closes [#4842](#4842) - **rules:** deprecate landmark-complementary-is-top-level rules ([#4992](#4992)) ([9e09139](9e09139)), closes [#4950](#4950) - **utils:** add `getElementInternals` function ([#5077](#5077)) ([1c15f82](1c15f82)) ### Bug Fixes - **aria-allowed-attr:** restrict br and wbr elements to aria-hidden only ([#4974](#4974)) ([c6245e7](c6245e7)) - **aria-conditional-attr:** add support for radio ([#5100](#5100)) ([8223c98](8223c98)) - **aria-valid-attr-value:** handle multiple aria-errormessage IDs ([#4973](#4973)) ([0489e30](0489e30)) - **aria:** prevent getOwnedVirtual from returning duplicate nodes ([#4987](#4987)) ([48ca955](48ca955)), closes [#4840](#4840) - **commons/text:** exclude natively hidden elements from aria-labelledby accessible name ([#5076](#5076)) ([ea7202c](ea7202c)), closes [#4704](#4704) - **DqElement:** avoid calling constructors with cloneNode ([#5013](#5013)) ([0281fa1](0281fa1)) - **existing-rule:** aria-busy now shows an error message for a use with unallowed children ([#5017](#5017)) ([2067b87](2067b87)) - **helpUrl:** ensure axe.configure always updates the help URLs ([#5114](#5114)) ([c4f60ff](c4f60ff)) - **label-content-name-mismatch:** match visible text with aria-label and exclude invisible text ([#5096](#5096)) ([3a012a1](3a012a1)) - **locale:** ensure all subtags are correctly set ([#5112](#5112)) ([13005ed](13005ed)) - **scrollable-region-focusable:** clarify the issue is in safari ([#4995](#4995)) ([4ec5211](4ec5211)), closes [WebKit#190870](https://github.com/dequelabs/WebKit/issues/190870) [WebKit#277290](https://github.com/dequelabs/WebKit/issues/277290) - **scrollable-region-focusable:** do not fail scroll areas when all content is visible without scrolling ([#4993](#4993)) ([838707a](838707a)) - **target-size:** determine offset using clientRects if target is display:inline ([#5012](#5012)) ([a4b8091](a4b8091)) - **target-size:** ignore position: fixed elements that are offscreen when page is scrolled ([#5066](#5066)) ([1229a6e](1229a6e)), closes [#5065](#5065) - **target-size:** ignore widgets that are inline with other inline elements ([#5000](#5000)) ([a8dd81b](a8dd81b)) - **utils/getAncestry:** escape node name ([#5079](#5079)) ([d1fabaa](d1fabaa)), closes [#5078](#5078) - **utils:** Add null check to parseCrossOriginStylesheet, closes [#5074](#5074) ([#5075](#5075)) ([f12ef32](f12ef32)) - **utils:** update isShadowRoot to use spec-compliant custom element regex ([#5059](#5059)) ([edc6ce2](edc6ce2)), closes [#5030](#5030) This PR was opened by a robot 🤖 🎉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated existing rule for aria-required-children for cases where the aria-busy attribute is used. This now will show the user a specific error message regarding aria-busy with unallowed children instead of the one for used for other cases using unallowed children.
Replaces PR: 5011
Closes: #4626