[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

PhosphorIcon: default role to img when aria-label is provided #2358

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

SeanMcP
Copy link
Member
@SeanMcP SeanMcP commented Nov 13, 2024

Summary:

When an aria-label is provided, there should be a role applied to the element to give it meaning to browsers and screenreaders. This PR defaults the role to "img" in PhosphorIcon when an aria-label is provided.

I'm not sure what our definitions are for "major", "minor", and "patch" releases. I would consider this a minor release since we are changing the behavior (even if it is slight), but it is backwards compatible so patch might be fine.

Issue: WB-1795

Test plan:

  • Tests pass
  • Axe is happy

@SeanMcP SeanMcP self-assigned this Nov 13, 2024
Copy link
changeset-bot bot commented Nov 13, 2024

🦋 Changeset detected

Latest commit: e9644a1

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

This PR includes changesets to release 15 packages
Name Type
@khanacademy/wonder-blocks-icon Minor
@khanacademy/wonder-blocks-accordion Patch
@khanacademy/wonder-blocks-banner Patch
@khanacademy/wonder-blocks-birthday-picker Patch
@khanacademy/wonder-blocks-button Patch
@khanacademy/wonder-blocks-dropdown Patch
@khanacademy/wonder-blocks-form Patch
@khanacademy/wonder-blocks-icon-button Patch
@khanacademy/wonder-blocks-link Patch
@khanacademy/wonder-blocks-search-field Patch
@khanacademy/wonder-blocks-switch Patch
@khanacademy/wonder-blocks-modal Patch
@khanacademy/wonder-blocks-popover Patch
@khanacademy/wonder-blocks-pill Patch
@khanacademy/wonder-blocks-tooltip 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 November 13, 2024 14:06
@khan-actions-bot
Copy link
Contributor
khan-actions-bot commented Nov 13, 2024

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to .changeset/dirty-dragons-fix.md, packages/wonder-blocks-icon/src/components/phosphor-icon.tsx, packages/wonder-blocks-icon/src/components/__tests__/phosphor-icon.test.tsx

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

Copy link
Contributor
github-actions bot commented Nov 13, 2024

Size Change: +43 B (+0.04%)

Total Size: 101 kB

Filename Size Change
packages/wonder-blocks-icon/dist/es/index.js 871 B +43 B (+5.19%) 🔍
ℹ️ 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.77 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 887 B
packages/wonder-blocks-button/dist/es/index.js 4.04 kB
packages/wonder-blocks-cell/dist/es/index.js 2.01 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.06 kB
packages/wonder-blocks-core/dist/es/index.js 3.44 kB
packages/wonder-blocks-data/dist/es/index.js 6.24 kB
packages/wonder-blocks-dropdown/dist/es/index.js 18.2 kB
packages/wonder-blocks-form/dist/es/index.js 6.21 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-i18n/dist/es/index.js 4.76 kB
packages/wonder-blocks-icon-button/dist/es/index.js 3 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-layout/dist/es/index.js 1.82 kB
packages/wonder-blocks-link/dist/es/index.js 2.28 kB
packages/wonder-blocks-modal/dist/es/index.js 5.36 kB
packages/wonder-blocks-pill/dist/es/index.js 1.65 kB
packages/wonder-blocks-popover/dist/es/index.js 4.87 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.3 kB
packages/wonder-blocks-switch/dist/es/index.js 1.94 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.74 kB
packages/wonder-blocks-testing/dist/es/index.js 1.07 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 2.36 kB
packages/wonder-blocks-toolbar/dist/es/index.js 827 B
packages/wonder-blocks-tooltip/dist/es/index.js 7.08 kB
packages/wonder-blocks-typography/dist/es/index.js 1.23 kB

compressed-size-action

Copy link
Contributor
github-actions bot commented Nov 13, 2024

A new build was pushed to Chromatic! 🚀

undefined

Chromatic results:

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

@SeanMcP
Copy link
Member Author
SeanMcP commented Nov 13, 2024

⚠️ No Changeset found

Latest commit: 3f382ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
Click here to learn what changesets are, and how to add one.

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

@khanacademy/wonder-blocks-icon doesn't appear in the changeset list:

image

Update: I needed to look farther down under "Changed packages"

Copy link
Contributor
github-actions bot commented Nov 13, 2024

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (e968f06) 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="PR2358"

Packages can also be installed manually by running:

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

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.

Great - thank you! This does feel like a minor change to me, agreed.

@SeanMcP SeanMcP merged commit c111059 into main Nov 13, 2024
25 checks passed
@SeanMcP SeanMcP deleted the WB-1795_phosphoricon-role-img branch November 13, 2024 15:09
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.

3 participants