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(LEMS-2086): Add aria label to Popover Content #2263

Merged
merged 5 commits into from
Jul 1, 2024

Conversation

anakaren-rojas
Copy link
Contributor

@anakaren-rojas anakaren-rojas commented Jun 27, 2024

Summary:

Aria-labels are not being added to the View component, causing accessibility issues.
This PR adds aria-label to View

Issue: LEMS-2089

Test plan:

@anakaren-rojas anakaren-rojas self-assigned this Jun 27, 2024
Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: c4db32e

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

This PR includes changesets to release 1 package
Name Type
@khanacademy/wonder-blocks-popover 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

@khan-actions-bot khan-actions-bot requested a review from a team June 27, 2024 21:04
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Jun 27, 2024

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to .changeset/selfish-spiders-care.md, packages/wonder-blocks-popover/src/components/popover-content-core.tsx, packages/wonder-blocks-popover/src/components/__tests__/popover.test.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@anakaren-rojas anakaren-rojas requested review from handeyeco and catandthemachines and removed request for a team June 27, 2024 21:04
Copy link
Contributor

github-actions bot commented Jun 27, 2024

Size Change: +6 B (+0.01%)

Total Size: 97.1 kB

Filename Size Change
packages/wonder-blocks-popover/dist/es/index.js 4.86 kB +6 B (+0.12%)
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.78 kB
packages/wonder-blocks-banner/dist/es/index.js 1.53 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.72 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 1.13 kB
packages/wonder-blocks-button/dist/es/index.js 4.28 kB
packages/wonder-blocks-cell/dist/es/index.js 2.25 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.3 kB
packages/wonder-blocks-core/dist/es/index.js 3.66 kB
packages/wonder-blocks-data/dist/es/index.js 6.34 kB
packages/wonder-blocks-dropdown/dist/es/index.js 14.4 kB
packages/wonder-blocks-form/dist/es/index.js 5.34 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-i18n/dist/es/index.js 4.6 kB
packages/wonder-blocks-icon-button/dist/es/index.js 3.23 kB
packages/wonder-blocks-icon/dist/es/index.js 1.06 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-layout/dist/es/index.js 1.94 kB
packages/wonder-blocks-link/dist/es/index.js 2.53 kB
packages/wonder-blocks-modal/dist/es/index.js 5.51 kB
packages/wonder-blocks-pill/dist/es/index.js 1.64 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.54 kB
packages/wonder-blocks-switch/dist/es/index.js 2.09 kB
packages/wonder-blocks-testing/dist/es/index.js 3.94 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 1.74 kB
packages/wonder-blocks-toolbar/dist/es/index.js 855 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.91 kB
packages/wonder-blocks-typography/dist/es/index.js 1.48 kB

compressed-size-action

@khan-actions-bot khan-actions-bot requested a review from a team June 27, 2024 21:06
Copy link
Contributor

github-actions bot commented Jun 27, 2024

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-homvxqunmu.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 340
Tests with visual changes 0
Total stories 428
Inherited (not captured) snapshots [TurboSnap] 0
Tests on the build 340

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.76%. Comparing base (dcafa86) to head (c4db32e).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2263      +/-   ##
==========================================
+ Coverage   93.91%   95.76%   +1.85%     
==========================================
  Files         248      248              
  Lines       29514    29516       +2     
  Branches     2407     1847     -560     
==========================================
+ Hits        27717    28267     +550     
+ Misses       1793     1236     -557     
- Partials        4       13       +9     
Files Coverage Δ
...ks-popover/src/components/popover-content-core.tsx 100.00% <100.00%> (ø)

... and 46 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcafa86...c4db32e. Read the comment docs.

Copy link
Contributor

github-actions bot commented Jun 27, 2024

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (f5c3293) and published all packages with changesets to npm.

You can install the packages in webapp by running:

./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2263"

Packages can also be installed manually by running:

yarn add @khanacademy/wonder-blocks-<package-name>@PR2263

@catandthemachines
Copy link
Member

Could you add a unit test that ensures the ariaLabel is set when passed in?

@@ -70,6 +70,7 @@ export default class PopoverContentCore extends React.Component<Props> {

render(): React.ReactNode {
const {
"aria-label": ariaLabel,
Copy link
Member

Choose a reason for hiding this comment

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

Oh interesting, so the ariaLabel prop is exposed, but the value is not piped through to View component??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup it accepts all the aria-* labels by default, but we have to expose them individually @catandthemachines

@jeresig jeresig changed the title add aria label to view component Add aria label to Popover Content Jun 28, 2024
Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Ahh - sounds good, thanks!

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Oh yes, good idea, thank you

@anakaren-rojas anakaren-rojas changed the title Add aria label to Popover Content fix(LEMS-2086): Add aria label to Popover Content Jul 1, 2024
@anakaren-rojas anakaren-rojas merged commit 78ee53c into main Jul 1, 2024
24 checks passed
@anakaren-rojas anakaren-rojas deleted the LEMS-2089-expose-aria-label branch July 1, 2024 16:26
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.

4 participants