Problem/Motivation
The is a follow up to #1272990: Make tabledrag warning message show when row weights are enabled, and add WAI-ARIA live region which was committed to Drupal 8.0.
It was then re-opened in #1272990-22: Make tabledrag warning message show when row weights are enabled, and add WAI-ARIA live region to consider the use of Drupal.announce instead of role="alert". Refer to that comment and the following discussions for more information.
Steps to reproduce
Proposed resolution
Decide if Drupal.announce should be used Drupal announce is overkill as adding role="alert" to the element displaying accomplishes the same thing.
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Release notes snippet
TBD
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | tabledrag-alert-1272990-79.patch | 1.37 KB | quietone |
Comments
Comment #2
quietone commentedThis is the latest patch from the other issue, it made with 8.2.x.
Comment #3
lendudeTaking my comment from #1272990: Make tabledrag warning message show when row weights are enabled, and add WAI-ARIA live region
We need more info on the direction before we can move this forward, so postponing for now.
Comment #4
bnjmnmUnless there's evidence that
role="alert"is inferior to usingaria-live="assertive"(what Drupal.announce() uses) for conveying important information to AT, this should remain as-is. The message needs to be visible, so there's no point in sending the same string to Drupal.announce() unless there's proven issues withrole="alert", especially since the current logic is in a theme function - a function that ideally generates markup and does nothing else.On paper, they are supposed to function similarly. I see in #1272990: Make tabledrag warning message show when row weights are enabled, and add WAI-ARIA live region there's a comment saying
role="alert""does not have great support", but it's quite possible browsers/AT have caught up in the 7 years, especially considering thatrole="alert"is used to convey form validation errors and that was not met with concern.I wasn't able to find any evidence that
role="alert"is lacking in any of Drupal's supported browsers, but it's possible it isn't documented or the issue is on the AT side. I provided a snippet that can be used to test ifrole="alert"is sufficient without having to even run Drupal. Paste this into any browser console, and it will create a button that when clicked, triggers a message in arole="alert"div. If that message is successfully conveyed, there isn't a problem. I tried this out with Voiceover on all my OSX browsers, but obviously there are more combinations.Comment #5
mgiffordBest reference I know on aria-live usage is:
https://a11ysupport.io/tests/tech__aria__aria-live
I haven't seen any comparisons of role="alert" and aria-live="assertive"
Comment #6
bnjmnmI previously tested all my Mac browsers with Voiceover (FF, Opera, Chrome, Safari), and I just tested Edge/Firefox/Chrome in Windows using Narrator/Jaws/NVDA. Adding the alert role functions identically to aria-live="assertive" (and thus works identically to Drupal.announce() set to assertive), so a role="alert" can be added to the element displaying the warning and it is accessible. Go ahead and change the role. It sounds like there were issues at some point with
role="alert"when it was mentioned in that other issue in but as one would hope things improved in the decade that followed.Comment #7
mgiffordLooks like an error identification error handling issue to me https://www.w3.org/WAI/WCAG21/Understanding/error-identification
Comment #9
lendudeThanks for the feedback, pretty clear on the next steps! Moving this to needs work.
Comment #10
nlisgo commented@Lendude, since you marked this issue as postponed in #3 the only comment that possibly calls for any next steps are in #7. And the next steps are not clear to me, could you perhaps update the issue summary?
Comment #11
lendude@nlisgo ha! good point, I miss read/remembered what needed to be done here.
So the conclusion in #6 was that role='alert' is fine, I thought the next step was to add that, but we already add that, so we don't need to do anything here, I think. So closing this. Please feel free to reopen this is you think there is still work that needs to be done here
Comment #12
nlisgo commented@Lendude. Thanks for the quick followup. I was scratching my head on what the obvious next step was. I agree with outcome.
Comment #13
nlisgo commented@mgifford I see you have tagged this issue wcag331 are you happy with this outcome?