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: improve button accessibility #105

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jshawl
Copy link
Contributor

@jshawl jshawl commented May 2, 2023

This PR updates the alt attribute so that screenreaders pronounce non-abbreviated text. e.g "pp" will now be pronounced "paypal" when using a screenreader.

This PR is related to https://github.com/paypal/paypal-checkout-components/pull/2156/files and together we end up with a dom like:

<div>
  <span aria-label="pay with">
 <svg alt="PayPal" />
</div>

and when focusing on the parent div, text will be read aloud as "Pay with PayPal"

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (2454e73) 86.17% compared to head (d866722) 86.17%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #105   +/-   ##
=======================================
  Coverage   86.17%   86.17%           
=======================================
  Files          38       38           
  Lines         434      434           
  Branches       59       59           
=======================================
  Hits          374      374           
  Misses         57       57           
  Partials        3        3           
Impacted Files Coverage Δ
src/lib/components.jsx 75.00% <ø> (ø)
src/logos/paypal/logo.jsx 91.89% <ø> (ø)
src/constants.js 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

1 participant