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]: Tab component reporting violation of 2.5.8 Minimum Target Size #17353

Closed
2 tasks done
nkn2022 opened this issue Sep 6, 2024 · 5 comments
Closed
2 tasks done

Comments

@nkn2022
Copy link

nkn2022 commented Sep 6, 2024

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

1.57.0

React version

17.0.2

Automated testing tool and ruleset

IBM Equal Access Accessibility Checker

Assistive technology

No

Description

https://react.carbondesignsystem.com/?path=/story/components-tabs--playground
Run the tool with 7.3 requirement.
See the violation on

<button title="Remove Dashboard tab" class="cds--visually-hidden cds--tabs__nav-item--close-icon--selected" aria-hidden="true" tabindex="-1" type="button">

IBM 2.5.8 Target Size (Minimum)
Undersized target "button" does not have sufficient spacing of 12 CSS pixels from another target "button"

image

WCAG 2.1 Violation

BM 2.5.8 Target Size (Minimum)

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-tabs--playground

Steps to reproduce

Run the tool with IBM Equal Access Accessibility Checker (7.3)

Suggested Severity

None

Code of Conduct

@tay1orjones
Copy link
Member

There's some more context around this in #16033 when the html for dismissable tabs was refactored.

@alisonjoseph in that issue, @mbgower pointed out that this button is always in the DOM. Do you recall why we left it that way? What would be the repercussions of fully removing the button from the DOM when the tab is not dismissable?

  1. you've implemented this not just on the dismissible tabs, but on ALL the version of Tabs in storybook (default, contained, etc). That shouldn't be happening; it should only exist on the dismissible ones. In the screenshot, you can see that the Jaws red focus indicator is on a small region to the upper right of the Monitoring tab which has nothing there visually. It is announcing this as "close tab button"
image

Beyond this, @philljenkins based on your testing the button isn't announced, clickable, or able to be invoked via touch/tap. It's fully hidden from the users view and interaction. In many ways this feels like a false positive to me. What do you think?

@tay1orjones tay1orjones added severity: 2 https://ibm.biz/carbon-severity and removed severity: 3 https://ibm.biz/carbon-severity labels Oct 28, 2024
@philljenkins
Copy link

philljenkins commented Oct 28, 2024

@tay1orjones We confirmed that clipped it is 0, 0, 0, 0. Now the Checker rule will ignore it as "valid" as part of #2070. The next release of the Checker rule set will have this fix. But Carbon could do "better" use display:"none" if you really don't want those tiny unused close buttons to be ignored.

We also reviewed the "dismissable tab" example and the Checker correctly flags a "Needs review" to confirm that the sizes of the overlapped touch target of both the close button on top of the tab button are sufficient. They are because the tab size button is large enough even with the close button on top of it..

@tay1orjones
Copy link
Member

Nice, thanks for the clarity! Related #17149

@tay1orjones tay1orjones closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
@github-project-automation github-project-automation bot moved this from ⏱ Backlog to ✅ Done in Design System Oct 28, 2024
@nkn2022
Copy link
Author

nkn2022 commented Oct 28, 2024

Thanks for the clarifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants