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

Checkbox has redundant aria role and property #1553

Closed
2 tasks done
Magsu opened this issue Sep 27, 2024 · 0 comments · Fixed by #1628
Closed
2 tasks done

Checkbox has redundant aria role and property #1553

Magsu opened this issue Sep 27, 2024 · 0 comments · Fixed by #1628
Assignees
Labels

Comments

@Magsu
Copy link

Magsu commented Sep 27, 2024

Provide a general summary of the issue here

Due to redundant aria-checked, when using a screen reader, checbox’s status (checked/not checked) is read twice. This might confuse screen reader users. The checkbox also contains a duplicate role, which is redundant and might confuse some screen reader software. The semantic HTML input element does already have the correct role and status.

VoiceOver (on mac and iOS) and TalkBack (on Android) do ignore the duplicate status, but NVDA, which is the most commonly used screen reader on PC does not.

🤔 Expected Behavior?

The checkbox status is read once.

😯 Current Behavior

The checkbox’s status is read twice when focusing on the element using a screen reader.

💁 Possible Solution

Remove redundant duplicate role and state from the element.
image

Move required to the correct elements. The required is not interpreted by all screen readers, as it is not part of the active elements.
image

The input element does semantically already have everything built in for a screen reader to interpret it correctly.

🖥️ Steps to Reproduce

  1. Open a page with a checkbox element (e.g. [Checkbox Group Required](Open https://storybook.sanomalearning.design/?path=/story/form-checkbox-group--required)
  2. Start a screen reader (NVDA for Windows, VoiceOver will not display this problem correctly due to its differing interpretation method)
  3. Focus the checkbox element (for NVDA use tab)

What browsers are you seeing the problem on? (only for bugs in code)

Chrome

If other, please specify.

No response

What operating system are you using?

Windows 10

👤 Your name

Valtteri Järvinen

🧢 Your product/team

External

🎨 Your Theme(s)

Sanoma Learning

Tasks

Preview Give feedback
@Magsu Magsu added bug Something isn't working development triage An issue needed triage labels Sep 27, 2024
@github-project-automation github-project-automation bot moved this to 📥 Incoming in SL Design System Team Sep 27, 2024
@DanielleRameau DanielleRameau moved this from 📥 Incoming to 🗃️ Backlog in SL Design System Team Oct 16, 2024
@DanielleRameau DanielleRameau removed the triage An issue needed triage label Oct 16, 2024
@DanielleRameau DanielleRameau moved this from 🗃️ Backlog to 🔜 Next up in SL Design System Team Oct 22, 2024
@anna-lach anna-lach self-assigned this Nov 5, 2024
@anna-lach anna-lach linked a pull request Nov 13, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 👀 Needs review to ✅ Done in SL Design System Team Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants