Skip to content
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

[Bug Report] Skeleton loaders should not have aria-busy and alert role #10999

Closed
phiter opened this issue Apr 1, 2020 · 3 comments
Closed

[Bug Report] Skeleton loaders should not have aria-busy and alert role #10999

phiter opened this issue Apr 1, 2020 · 3 comments
Assignees
Labels
a11y Accessibility issue C: VSkeletonLoader T: bug Functionality that does not work as intended/expected

Comments

@phiter
Copy link
Contributor

phiter commented Apr 1, 2020

Environment

Vuetify Version: 2.2.20
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.149
OS: Windows 10

Steps to reproduce

  1. Add skeleton loader on page
  2. Inspect root element of the loader

Expected Behavior

It should not have aria-busy="true" and role="alert".

Actual Behavior

It does.

Reproduction Link

https://codepen.io/phiter/pen/zYGXrZY

Other comments

With the current implementation, whenever a skeleton loader is added to the page, it causes screenreaders to read "alert busy", for each loader there is.

The current usage of aria-busy for skeleton loaders is wrong.

aria-busy should not be used in the skeleton loader itself. This aria state should be used in the parent container whenever its contents are changing, which is a case where the user would use skeleton loaders.

So both these attributes should be removed from this component.

The accessibility section of skeleton docs can mention that the user should add aria-busy to a list, for example, if you start loading more items and add skeleton loaders. Then after loading ends, remove that attribute.

@ghost ghost added the S: triage label Apr 1, 2020
@phiter phiter added a11y Accessibility issue C: VSkeletonLoader T: bug Functionality that does not work as intended/expected and removed S: triage labels Apr 1, 2020
@phiter phiter changed the title [Bug Report] Skeleton loaders should not have aria-busy and role alerts [Bug Report] Skeleton loaders should not have aria-busy and alert role Apr 1, 2020
@aardrian
Copy link

aardrian commented Dec 1, 2020

To add more information to this bug report...

I was provided an example that not only shows the skeleton but also what happens when the content loads:
https://3708o.csb.app/

Using that and the example above I can confirm that VoiceOver with Safari 14 on macOS 11 announces alert (and each newline) when I navigate to the skeleton using the virtual cursor. JAWS does not, NVDA does not.

Part of the issue is that only JAWS (2020, but I believe back to 2018) honors aria-busy:
https://developer.paciellogroup.com/blog/2018/05/short-note-on-being-busy/

Narrator (Windows 10 Pro with Edge 87), NVDA (2020.2 with Chrome 87 and Firefox 83), TalkBack (Android 11 with Chrome 86 and Firefox 83), and VoiceOver (iOS 14, macOS 11) treat aria-busy content as any other (as in, aria-busy is completely ignored). You don't hear anything announced because there are no text nodes to announce.

This construct will not work as-is, but having an alert role (which interrupts and clears the speech buffer, pre-pending the word "alert") and aria-live="polite" (which waits until the buffer is empty) is already a very odd pairing given these two are in opposition to one another. There may have been some bug these were meant to address, but I cannot guess what it was.

Either way, given that the skeleton has no content, given that it gives screen readers no context that content is loading, and given that it announces particularly poorly in VoiceOver, I recommend replacing aria-busy with aria-hidden and possibly exposing a visually-hidden node that says content is loading (or potentially a polite live region, as offensive as that may be to some users).

@johnleider
Copy link
Member

As far as I can tell from research, besides not having a proper aria-label, we are inline with how other frameworks implement skeleton loaders, despite mixed suggestions across the web. I'm adding aria-label to provide "Loading..." text and in lieu of using our defaults, simply overwrite the values you think would be better locally.

@KaelWD
Copy link
Member

KaelWD commented Jun 7, 2023

Testing #17073 with NVDA, it doesn't read anything at all without role=alert. aria-busy makes it say "Loading alert busy" instead of "Loading alert"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility issue C: VSkeletonLoader T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

4 participants