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

Pass aria-label down to correct element #1101

Merged
merged 4 commits into from
Mar 2, 2021
Merged

Pass aria-label down to correct element #1101

merged 4 commits into from
Mar 2, 2021

Conversation

emplums
Copy link

@emplums emplums commented Mar 2, 2021

This PR patches a bug introduced in my last TabNav PR. I refactored the components so that the nav component is the inner component (as it should be & to match implementation in .com), but I forgot to forward aria-label down to the nav which was throwing axe errors in Memex.

This PR fixes that and updates the tests to be more specific, making sure the aria-label gets applied to the nav and not the wrapping element ☮️

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added or updated TypeScript definitions (index.d.ts) if necessary
  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2021

🦋 Changeset detected

Latest commit: 44aa68e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/7FzqSK1yiUBxXx2pC7q3YDx4kUJ7
✅ Preview: https://primer-components-git-tabnav-aria-primer.vercel.app

@emplums emplums requested review from smockle and T-Hugs March 2, 2021 23:37
@@ -1,6 +1,6 @@
import React from 'react'
import {TabNav} from '..'
import {mount, render, rendersClass, behavesAsComponent, checkExports} from '../utils/testing'
Copy link
Author

Choose a reason for hiding this comment

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

These weren't being used anywhere

@vercel vercel bot temporarily deployed to Preview March 2, 2021 23:39 Inactive
@emplums emplums merged commit 709cf89 into main Mar 2, 2021
@emplums emplums deleted the tabnav-aria branch March 2, 2021 23:47
@github-actions github-actions bot mentioned this pull request Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants