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(PageHeader): include role and aria-label in top-level element #4949

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Sep 11, 2024

Closes #https://github.com/github/primer/issues/3466

Changelog

New

  • PageHeader tests to assert added functionality

Changed

  • Adjust PageHeader's aria-label docs description to reference "banner landmark" instead of "main landmark"
  • Include aria-label prop in PageHeader Playground story
  • Set aria-label attribute in PageHeader's "root" element mapped to the supplied aria-label (defaults to "banner")

Removed

N/A

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

  • Check preview Playground story:
    • Notice in the DOM the "banner" role in the top-level Box element and the aria-label that maps to the title prop
    • Change title prop in playground and notice the aria-label change in the DOM as well
  • Check preview Default story:
    • Notice in the DOM the "banner" role in the top-level Box element and the aria-label that defaults to "banner"

Merge checklist

Copy link

changeset-bot bot commented Sep 11, 2024

🦋 Changeset detected

Latest commit: 851e72f

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

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

Copy link
Contributor

github-actions bot commented Sep 11, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 97.1 KB (+0.03% 🔺)
packages/react/dist/browser.umd.js 97.52 KB (+0.06% 🔺)

@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/341657

@francinelucca
Copy link
Member Author

This change will introduce a11y violations, going with another strategy, closing

@francinelucca francinelucca deleted the francinelucca/3466-prcpageheader-best-practice-container-lacks-a-role branch September 11, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant