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

fix(cta): add default aria-label for different types #5096

Merged
merged 8 commits into from
Feb 12, 2021

Conversation

IgnacioBecerra
Copy link
Contributor

@IgnacioBecerra IgnacioBecerra commented Feb 4, 2021

Related Ticket(s)

#2728
#2384
#4142
#4060

Description

Added an aria-label to inform screen reader users the CTA about the type of link they are focused on, such as external, video, or download. The default label is provided in English by default, but the message can be a custom translation that is passed in using the ariaLabel prop by adopters.

This PR also changes the role of LinkList to listitem with the use of a custom ariaRole prop to specify different roles depending on the use within components.

Changelog

New

  • added ariaLabel to CTA component for adopters to customize the message in a different language
  • added ariaProp to CTA component to set a custom role depending on the use in other components

Changed

  • aria-label message for CTA Text and Card
  • set role='listitem in LinkList

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 4, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 4, 2021

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Feb 4, 2021

@IgnacioBecerra IgnacioBecerra added the package: react Work necessary for the Carbon for IBM.com react components package label Feb 5, 2021
@IgnacioBecerra IgnacioBecerra marked this pull request as draft February 6, 2021 01:21
@IgnacioBecerra IgnacioBecerra changed the title fix(cta-card): add proper aria-label for video type fix(cta): add default aria-label for different types Feb 8, 2021
@IgnacioBecerra IgnacioBecerra marked this pull request as ready for review February 8, 2021 23:05
Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

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

LGTM!

@ariellalgilmore ariellalgilmore self-requested a review February 11, 2021 21:26
Copy link
Member

@annawen1 annawen1 left a comment

Choose a reason for hiding this comment

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

LGTM too!

@ariellalgilmore ariellalgilmore added the Ready to merge Label for the pull requests that are ready to merge label Feb 12, 2021
@kodiakhq kodiakhq bot merged commit 728499f into carbon-design-system:master Feb 12, 2021
IgnacioBecerra added a commit to IgnacioBecerra/ibm-dotcom-library that referenced this pull request Feb 22, 2021
…ystem#5096)

### Related Ticket(s)
carbon-design-system#2728
carbon-design-system#2384
carbon-design-system#4142
carbon-design-system#4060 

### Description

Added an `aria-label` to inform screen reader users the CTA about the type of link they are focused on, such as `external`, `video`, or `download`. The default label is provided in English by default, but the message can be a custom translation that is passed in using the `ariaLabel` prop by adopters.

This PR also changes the `role` of LinkList to `listitem` with the use of a custom `ariaRole` prop to specify different roles depending on the use within components.

### Changelog

**New**

- added `ariaLabel` to `CTA` component for adopters to customize the message in a different language
- added `ariaProp` to `CTA` component to set a custom role depending on the use in other components

**Changed**

- `aria-label` message for CTA Text and Card
- set `role='listitem` in `LinkList`

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "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
package: react Work necessary for the Carbon for IBM.com react components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants