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

10921: add aria-label to anchor tags inside bx-tabs for accessbility #11047

Merged

Conversation

pjudge
Copy link
Contributor

@pjudge pjudge commented Oct 17, 2023

Related Ticket(s)

Closes #10921

Description

This PR adds aria-label to the tags inside of bx-tab component. Since the text inside the tags is in a slot in the shadow dom, the links are being flagged for not having meaningful text. This PR fixes that.

Changelog

Changed

  • Adds aria-label with the link text to tags inside bx-tab component.

Steps for testing

  1. Navigate to Tabs in Carbon Web Components.
  2. Click Open Canvas in New Tab box in upper left.
  3. Have IBM Equal Access Accessibility checker installed as Chrome extension. Scan the page.
  4. Note the lack of the original accessibility fail ("Interactive component with ARIA role 'tab' does not have a programmatically associated name").
  5. Compare by following the same steps at Carbon Web Components v1 storybook.

@pjudge pjudge marked this pull request as ready for review October 17, 2023 17:04
@pjudge pjudge requested a review from a team as a code owner October 17, 2023 17:04
@m4olivei m4olivei added bug Something isn't working severity 3 Affects minor functionality, has a workaround dev Needs some dev work accessibility Has accessibility requirement package: carbon web components labels Oct 17, 2023
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 17, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 17, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 17, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 17, 2023

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 17, 2023

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @pjudge!

@pjudge
Copy link
Contributor Author

pjudge commented Oct 25, 2023

Thanks @kennylam ! Now that I am working as an outside contributer, is it up to me to merge or for someone on your side?

@kennylam kennylam added Ready to merge Label for the pull requests that are ready to merge accessibility Has accessibility requirement and removed accessibility Has accessibility requirement labels Oct 28, 2023
@kodiakhq kodiakhq bot merged commit 7f51280 into carbon-design-system:main Oct 28, 2023
24 of 25 checks passed
kennylam pushed a commit that referenced this pull request Oct 28, 2023
…11047)

### Related Ticket(s)

Closes #10921 

### Description

This PR adds `aria-label` to the <a> tags inside of `bx-tab` component. Since the text inside the <a> tags is in a slot in the shadow dom, the links are being flagged for not having meaningful text. This PR fixes that. 

### Changelog

**Changed**

- Adds `aria-label` with the link text to <a> tags inside bx-tab component.

### Steps for testing
1. Navigate to [Tabs in Carbon Web Components](https://carbon-web-components.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/11047/index.html?path=/story/components-tabs--default).
2. Click Open Canvas in New Tab box in upper left. 
3. Have IBM Equal Access Accessibility checker installed as Chrome extension. Scan the page.
4. Note the lack of the original accessibility fail ("Interactive component with ARIA role 'tab' does not have a programmatically associated name").
5. Compare by following the same steps at [Carbon Web Components v1 storybook](https://web-components-v1.carbondesignsystem.com/?path=/story/components-tabs--default).

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Dec 4, 2023
…arbon-design-system#11047)

### Related Ticket(s)

Closes carbon-design-system#10921 

### Description

This PR adds `aria-label` to the <a> tags inside of `bx-tab` component. Since the text inside the <a> tags is in a slot in the shadow dom, the links are being flagged for not having meaningful text. This PR fixes that. 

### Changelog

**Changed**

- Adds `aria-label` with the link text to <a> tags inside bx-tab component.

### Steps for testing
1. Navigate to [Tabs in Carbon Web Components](https://carbon-web-components.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/11047/index.html?path=/story/components-tabs--default).
2. Click Open Canvas in New Tab box in upper left. 
3. Have IBM Equal Access Accessibility checker installed as Chrome extension. Scan the page.
4. Note the lack of the original accessibility fail ("Interactive component with ARIA role 'tab' does not have a programmatically associated name").
5. Compare by following the same steps at [Carbon Web Components v1 storybook](https://web-components-v1.carbondesignsystem.com/?path=/story/components-tabs--default).

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
kennylam pushed a commit to kennylam/carbon-for-ibm-dotcom that referenced this pull request Jun 11, 2024
…arbon-design-system#11047)

### Related Ticket(s)

Closes carbon-design-system#10921 

### Description

This PR adds `aria-label` to the <a> tags inside of `bx-tab` component. Since the text inside the <a> tags is in a slot in the shadow dom, the links are being flagged for not having meaningful text. This PR fixes that. 

### Changelog

**Changed**

- Adds `aria-label` with the link text to <a> tags inside bx-tab component.

### Steps for testing
1. Navigate to [Tabs in Carbon Web Components](https://carbon-web-components.s3.us-east.cloud-object-storage.appdomain.cloud/deploy-previews/11047/index.html?path=/story/components-tabs--default).
2. Click Open Canvas in New Tab box in upper left. 
3. Have IBM Equal Access Accessibility checker installed as Chrome extension. Scan the page.
4. Note the lack of the original accessibility fail ("Interactive component with ARIA role 'tab' does not have a programmatically associated name").
5. Compare by following the same steps at [Carbon Web Components v1 storybook](https://web-components-v1.carbondesignsystem.com/?path=/story/components-tabs--default).

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Has accessibility requirement bug Something isn't working dev Needs some dev work package: carbon web components Ready to merge Label for the pull requests that are ready to merge severity 3 Affects minor functionality, has a workaround
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility violations prompted by the bx-tab from the tabs Web Component
4 participants