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

use index if available for promo id #9718

Merged
merged 7 commits into from
Dec 3, 2021

Conversation

jroebu14
Copy link
Contributor

@jroebu14 jroebu14 commented Dec 2, 2021

Overall change:
Fixes a11y violations where aria-labelledby and ID attributes on certain promos are not unique.

The PR essentially introduces the index into the aria-labelledby and ID to prevent duplicated attributes within the same group of promos.

Code changes:

  • Drills the index as a prop to the story promo component
  • Refactors/renames a few variables and the main ID building function.

  • I have assigned myself to this PR and the corresponding issues
  • I have added the cross-team label to this PR if it requires visibility across World Service teams
  • I have assigned this PR to the Simorgh project
  • (BBC contributors only) This PR follows the repository use guidelines

Testing:

  • Automated (jest and/or cypress) tests added (for new features) or updated (for existing features)
  • If necessary, I have run the local E2E non-smoke tests relevant to my changes (CYPRESS_APP_ENV=local CYPRESS_SMOKE=false yarn test:e2e:interactive)
  • This PR requires manual testing

@jroebu14 jroebu14 self-assigned this Dec 3, 2021
@jroebu14 jroebu14 added the a11y Accessibility-related task label Dec 3, 2021
@jroebu14 jroebu14 changed the title use id if available for promo id use index if available for promo id Dec 3, 2021
Copy link
Contributor

@nicola-d-bbc nicola-d-bbc left a comment

Choose a reason for hiding this comment

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

LGTM!

Co-authored-by: Nicola <52782713+nicola-d-bbc@users.noreply.github.com>
@jroebu14 jroebu14 merged commit 4e50f66 into latest Dec 3, 2021
@jroebu14 jroebu14 deleted the use-id-if-available-for-promo-id branch December 3, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility-related task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants