question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Button Skeleton]: Accessibility Label Issue

See original GitHub issue

Environment

Automated testing tool and ruleset IBM Automated Accessibility Testing - 2019-02 policy

Detailed description

What version of the Carbon Design System are you using? 9.77

What WCAG 2.1 checkpoint does the issue violate? H44 - “Each form control must have associated label.” https://www.w3.org/TR/WCAG20-TECHS/H44.html

Steps to reproduce the issue

Use the <ButtonSkeleton> https://codesandbox.io/s/j9gk3.

Additional information

Disclaimer I’m not an a11y expert, this was just caught by an automated scan. Normally the text inside the button serves as its label (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/button), but for skeleton that is empty. This poses a problem, as an assistive device does not know what that button does.

https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/Button/Button.Skeleton.js#L26 image

I’m wondering if we should even use the <button> tag for the skeleton? Since at that point it doesn’t do anything, would a <div> make more sense?

fyi: @beareye

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
snidersdcommented, Oct 1, 2019

@dakahn Tested with DAP and confirmed that this is also an issue in v10, Screen Shot 2019-10-01 at 1 47 50 PM

0reactions
joshblackcommented, Nov 20, 2019

@keithkade just to clarify, skeletons should not contain any text content inside of them (this should be something we update in the underlying component). I believe the current requirements from IBMa derive from: https://www.ibm.com/able/guidelines/ci162/status_messages_71.html

  1. Whenever one or more skeletons are used on a page the user is notified that the page is loading.
  2. If the user tabs to the skeleton component they are notified of the percentage the skeleton is loaded.
  3. Users are notified when the page load is complete.
  4. The role=“status” and aria-live=“assertive” is on loading content.

The one thing I’d distinguish is that you won’t necessarily want a single skeleton to have a label, but instead regions/groups of skeletons should be called out. Otherwise, you end up with messages flashing for every skeleton component when instead the preferred experience is to announce the region that is loading.

Going to close this for now, feel free to comment if you feel like this guidance isn’t relevant for this use-case!

Read more comments on GitHub >

github_iconTop Results From Across the Web

More Accessible Skeletons - Adrian Roselli
An issue against WCAG has been opened as a result of my post: #2048 Do skeleton loaders fall under “inactive” exemption of 1.4.11...
Read more >
Does a skeleton loader need to be accessible?
Are there concrete guidelines about accessibility in skeleton loaders? How might we design them to be more accessible?
Read more >
How to Fix: "Buttons Do Not Have Accessible Names"
Automated audits may present the “buttons do not have accessible names" error. Here's how to quickly remediate this accessibility issue.
Read more >
A Complete Guide To Accessible Front-End Components
An up-to-date collection of accessible front-end components: accordions, form styles, dark mode, data charts, date pickers, form styles, ...
Read more >
Handling common accessibility problems - MDN Web Docs
The three most common examples are links, form labels, and data tables. The key to accessible link text is that people using screen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found