-
Notifications
You must be signed in to change notification settings - Fork 781
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
Unexpected error and guidance raised for button with accName from label element #3696
Comments
I wonder if this is similar to #2488. That one used an explicit label to give a button a name, but we found it didn't work in Dragon Naturally Speaking. I can take a look to see if wrapping the button in an implicit label proves any better for it. |
per the results you have from the codepen test cases you have in that other issue, there are some tests that aren't valid - specifically |
Makes sense. I think I did that originally just for completeness of a test case. But I can rule out some of the more invalid cases when we do our retesting. |
Would appreciate that. Also, per Wilco's comment in the previous thread, I would completely agree with throwing a warning for support with Dragon (if it's still an issue. haven't checked myself) and that there are honestly better ways to name a button. I'm not going to argue about that at all, naming a button with a label element is kinda weird, but valid. So per other than what is being tested here, wcag conformance vs software support, it would be more accurate to surface this particular pattern as a warning for the potential lack of support - specifically with dragon, than saying it's a flat out failure. |
Update: We've tested this out. While explicit labels seem to work in Dragon 16, implicit labels on buttons still do not work, regardless of what role is put on them. Thanks for helping out @mfairchild365! Michael made a fair point here though, that maybe Dragon shouldn't be in our baseline anymore. There are alternatives to it, including on Windows. |
… accessible name (#4607) I'm not sure if this should close #4472 as that also deals with buttons with a different role running `button-name`. For sure this closes #3696 Closes: #3696 --------- Co-authored-by: Wilco Fiers <[email protected]>
### [4.10.1](v4.10.0...v4.10.1) (2024-10-16) ### Bug Fixes - **aria-allowed-role:** add form to allowed roles of form element ([#4588](#4588)) ([d462d67](d462d67)), closes [/github.com/dequelabs/axe-core/blob/develop/lib/standards/html-elms.js#L264](https://github.com/dequelabs//github.com/dequelabs/axe-core/blob/develop/lib/standards/html-elms.js/issues/L264) - **axe.d.ts:** add typings for preload options object ([#4543](#4543)) ([72e269f](72e269f)) - **button-name,input-button-name,input-img-alt:** allow label to give accessible name ([#4607](#4607)) ([364eb72](364eb72)), closes [#4472](#4472) [#3696](#3696) [#3696](#3696) - **get-ancestry:** add nth-child selector for multiple siblings of shadow root ([#4606](#4606)) ([bdd94a2](bdd94a2)), closes [#4563](#4563) - **rules:** Change "alternate text" to "alternative text" ([#4582](#4582)) ([31e0f61](31e0f61))
Product
axe-core
Product Version
4.4.2
Latest Version
Issue Description
The following code snippet (reduced test case) was flagged as a critical impact error under the button-name rule. However, the button does have an accessible name as it is provided by its parent
<label>
element.Example codepen: https://codepen.io/scottohara/pen/vYjrboB
Additional use case for associating a
<label>
with a<button>
provided in pen.It seems that maybe the rule for checking if a button has an accessible name doesn't take into account that a button can be provided its name via a
<label>
element association.===
As a related note to this rule, the "to solve this problem, you need to..." section that accompanies this error ends with
That seems out of place or incomplete guidance with this rule, as those roles would not be respected on a
<button>
due to the presentation role conflict resolutions and these roles are ignored outright so long as the button remains focusable.So that bullet seems like it should either be removed, or it needs to explicitly indicate that the
<button>
needs to also have thedisabled
attribute so those roles won't be ignored on the button.Related to the documentation piece of this issue, I've filed an issue against ARIA in HTML to better expose when
role=none | presentation
would be allowed on<button>
and<input>
elements.The text was updated successfully, but these errors were encountered: