-
Notifications
You must be signed in to change notification settings - Fork 126
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
Consider deprecating aria-errormessage due to existence of aria-describedby #2048
Comments
IMO the whole point of |
I like the idea of using the invalid state as the clue to force reading of aria-describedby. It doesn't have to be aria-invalid, but any invalid state for the field, right? https://css-tricks.com/almanac/selectors/i/invalid/ When conducting interviews for accessibility roles, I often ask how to mark up forms for good a11y. None of the candidates knew about aria-errormessage … It was aria-describedby all the way for form error messages. Anecdotal, but it seems like the awareness isn't there. |
Part of the reason for its lack of usage is that Could |
That idea was brought up to fix the UIA mappings. I think that could make sense, but I wonder if it would be confusing to have description calculation be different depending on the accessibility API, instead of it being the same for each API. Edit: In case anybody is curious about support, this is what I found the last time I touched this area (July 2023):
|
Similar discussion from a couple years ago: #128 |
IMO it is very useful for screen readers to have a distinction between descriptions, that could be muted by user option and an error message that cannot be so. But is there hope and possibility that all AAPIs and screen readers iplement the spec? |
Just adding another vote for against deprecation here. And adding another argument of why we should keep the Thanks to Adrian Roselli that opened the aria-description not exposed directly to VO users and " This has direct impact also on And situation with |
Actually, is aria: alert role not already doing the same thing? On the other hand, aria alert suffers from several bugs in NVDA, lots of cases where the focus is not properly handled in browse mode or many situations where reporting of "alert" interputs the reporting of the alert content itself or many cases where alert is not announced at all. see for example this issue: nvaccess/nvda#14990 Maybe we should join forces and improve support for aria alert role in screen readers and browsers, then we would not need the errormessage role. I think most web developers work with alert role anyway right? |
marking something as an alert doesn't associate it with the form control in question.
aria-errormessage is not a role, it's an attribute to identify the content that describes the error for the form control in question. So different things that 'could' work together, but alert is out of scope for this specific conversation. |
@Adriani90 - as @scottaohara already wrote - When screen-reader user navigates to the field that is marked as invalid (with for example
It also allows live regions (same message can have Live regions (like alert) used to communicate errors in complex forms are in my experience sometimes problematic for end users because they can be overheard (or "overwritten" by other alerts that may happen at the same time - I had experience with complex form that had a chat and another live region and it was a giant mess). But yes, that's another topic :) |
FYI, NVDA supports now aria errorMessage as per nvaccess/nvda#16411 |
aria-errormessage is significantly different from aria-describedby With aria-errormessage, you can build the association into the form template and activate the error message screen reader announcement by setting aria-invalid="true" on the invalid form control. This makes error message association easier, you don't need Jatascript to constantly juggle the aria-describedby values. |
Birkir, these do sound like a value add to me.
As a browser developer, I'm wondering if this all works consistently across
environments. Does anyone know? What testing has been done?
…On Thu, Jun 13, 2024 at 9:26 AM Birkir Gunnarsson ***@***.***> wrote:
aria-errormessage is significantly different from aria-describedby
The content of elements referenced with aria-describedby are always
announced, regardless of their visible status.
(it doesn't matter how you hide them, aria-describedby causes them to be
announced).
This is good for instructions, tooltips, and other static descriptive
text, but it's bad for conditional announcements such as error messages.
Authors often put error messages into the HTML template for a form but
display them only when there is an error.
If you are to use aria-describedby for this you have to use Javascript to
add and remove the aria-describedby attribute based on the visibility of
the error message. If they don't, and this happens quite often, the screen
reader user hears the error messages regardless of whether the form control
is in error or not.
With aria-errormessage, you can build the association into the form
template and activate the error message screen reader announcement by
setting aria-invalid="true" on the invalid form control.
(in most browsers this is automatically done for you if the form control
fails HTML5 form validation e.g. required fields left blank).
This makes error message association easier, you don't need Jatascript to
constantly juggle the aria-describedby values.
You can also set the visual display of the error message to the
aria-invalid attribute so you can ensure error message association is tied
to visibility.
There are the other things too, e.g. preventing screen reader users from
accidentally turning offf error message announcements through verbosity
settings.
Screen readers can automatically announce error messages before
aria-describedby references, so when an element has both you no longer have
to juggle the order of id attributes in the aria-describedby value.
A screen reader can implement earcons to identify error messages, etc.
—
Reply to this email directly, view it on GitHub
<#2048 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQAZTBNSXN3ZZPBIGCWZ3ZHGMWXAVCNFSM6AAAAAA5G777H6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVGY3TCNRSGE>
.
You are receiving this because you were mentioned.Message ID:
<w3c/aria/issues/2048/2165671621 ***@***.***>
|
@aleventhal, I've been using https://a11ysupport.io/tech/aria/aria-errormessage_attribute to keep track, though its tests seem a little outdated. I am also waiting for the glorious day when |
Wow! That's the first I've seen a11ysupport.io. As a browser developer,
this is a goldmine.
…On Fri, Jul 5, 2024 at 8:05 AM Isaiah Thomason ***@***.***> wrote:
@aleventhal <https://github.com/aleventhal>, I've been using
https://a11ysupport.io/tech/aria/aria-errormessage_attribute to keep
track, though its tests seem a little outdated.
I am also waiting for the glorious day when aria-errormessage is
supported, as it will allow me to make some simplifications to my
FormValidityObserver
<https://github.com/enthusiastic-js/form-observer/blob/main/docs/form-validity-observer/README.md>
library tool.
—
Reply to this email directly, view it on GitHub
<#2048 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQAZW7RRE2APWSY5TN5ODZK2DZNAVCNFSM6AAAAAA5G777H6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQG42TOMRQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
NVDA support has landed to stable NVDA (nvaccess/nvda#8318 🥇). As far as I know the only one missing I opened a bug report in Android public tracker (as Hopefully we will land on universal support and could finally use |
I'd like to add my voice to those against deprecation.
Using |
I would like to see |
I think we can close this. Issues filed with specific implementations make more sense. |
@aleventhal started a discussion in the Chromium slack regarding whether
aria-errormessage
is really needed whenaria-describedby
is already available.I tracked down the origin of
aria-errormessage
to ISSUE-651: Allow aria-invalid to specify more types of errors including custom errors. It seems that it was originally added to ensure screen readers on Apple operating systems would read an error message more readily. Aaron pointed out that an alternative is to prioritize reading the description ifaria-invalid
was true, potentially makingaria-errormessage
markup bloat.I'm opening this issue to gather feedback from the working group, or anyone else who might care. Aaron already expressed that he would be in favor of deprecating
aria-errormessage
, but I'll let him clarify in case I misrepresented his points.Just to add some thoughts:
aria-errormessage
at this time. There isn't an obvious path forward I'm aware of unless UIA is extended, or browsers start exposing another custom attribute separate fromAriaProperties
, or the hacky approach I proposed in the linked issue is considered (granted, I'm not too familiar with UIA).aria-errormessage
, on the other hand. I'm not sure how much error message semantics are used in native apps, but deprecating this attribute will make it so websites cannot define semantics available to native applications.The text was updated successfully, but these errors were encountered: