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

Fonts Library: Fix variants count color contrast and l10n best practices #58110

Closed
afercia opened this issue Jan 23, 2024 · 0 comments · Fixed by #58117
Closed

Fonts Library: Fix variants count color contrast and l10n best practices #58110

afercia opened this issue Jan 23, 2024 · 0 comments · Fixed by #58117
Assignees
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jan 23, 2024

Description

The font variants count in the side panel has a very low color contrast ratio of 2.68:1

Screenshot 2024-01-23 at 10 46 31

Also, concatenation with variables and translatable strings is not OK and doesn't meet the WordPress l10n best practices, even ore in this case where _n() is in use.

<FlexItem style={ { color: '#9e9e9e' } }>
{ variantsCount }{ ' ' }
{ _n( 'variant', 'variants', variantsCount ) }
</FlexItem>

Wirth also mentioning that, as far as I can tell, the gray #9e9e9e is not part of the established color palette. Such usage of unique, ad-hoc, colors shouldn't be allowed and, in any case, a sufficient color contrast ratio is a basic accessibility requirement. Also, inline styles should be avoided.

Introduced in #53884

Step-by-step reproduction instructions

  • Go to Site editor > Styles > Typography
  • Observe the text that indicates the font variants count has a very low color contrast ratio.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Typography Font and typography-related issues and PRs labels Jan 23, 2024
@afercia afercia self-assigned this Jan 23, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants