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

[a11y]: SidePanel: use <aside> rather than role="complementary" #6314

Open
2 tasks done
wkeese opened this issue Oct 30, 2024 · 3 comments
Open
2 tasks done

[a11y]: SidePanel: use <aside> rather than role="complementary" #6314

wkeese opened this issue Oct 30, 2024 · 3 comments
Labels
component: SidePanel priority: low This can wait to be picked up type: a11y ♿ Issues not following accessibility standards type: enhancement 💡 New feature or request web component

Comments

@wkeese
Copy link
Contributor

wkeese commented Oct 30, 2024

Package

@carbon/ibm-products

Browser

Chrome

Operating System

MacOS

Package version

2.52.0

React version

18

Automated testing tool and ruleset

SonarQube

Assistive technology

No response

Description

SonarQube has started to give warnings to use elements in preference to attributes, and additionally, MDN's documentation for role="complementary" says (three times!) to prefer <aside> over setting the complementary role.

Thus, I suggest to change SidePanel to use an <aside> rather than a <div role=complementary>.

WCAG 2.1 Violation

Unknown

Reproduction/example

https://carbon-for-ibm-products.netlify.app/?path=/story/ibm-products-components-side-panel-sidepanel--slide-over&globals=viewport:basic

Steps to reproduce

N/A

Code of Conduct

@amal-k-joy
Copy link
Contributor

recommended as here

@amal-k-joy amal-k-joy added priority: low This can wait to be picked up and removed status: needs triage 🕵️‍♀️ labels Nov 11, 2024
@amal-k-joy amal-k-joy moved this from Needs triage 🧐 to Backlog 🌋 in Carbon for IBM Products Nov 11, 2024
@devadula-nandan
Copy link
Contributor

include for web components too

@elycheea
Copy link
Contributor

elycheea commented Dec 3, 2024

<aside>/role="complementary" may be more appropriate for slide-in modals rather than slide-over modals which would be more of dialogs.

For future iterations of side panel, we could potentially consider using the as prop1 for aside/dialog instead of slide-in or slide-over since how these behave is actually more closely related to their actual roles instead.

Footnotes

  1. https://react.carbondesignsystem.com/?path=/docs/components-link--overview

@elycheea elycheea moved this from Backlog 🌋 to Next in Carbon for IBM Products Dec 3, 2024
@ljcarot ljcarot moved this from Next to Backlog 🌋 in Carbon for IBM Products Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: SidePanel priority: low This can wait to be picked up type: a11y ♿ Issues not following accessibility standards type: enhancement 💡 New feature or request web component
Projects
Status: Backlog 🌋
Development

No branches or pull requests

5 participants