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

Feature ever 13205 a11y buttons and links #311

Merged
merged 2 commits into from
May 10, 2021

Conversation

pixelbandito
Copy link
Contributor

Summary
Changes button, link, and most other colors that formerly used #0092c2 to use #007fa9, which passes color contrast checks when used on a white background (or as a background behind white text).

This should make our primary buttons and link-style faux-buttons pass a11y contrast checks.

Refactoring
I also replaced some component references to the palette's --rvr-blue variable with the semantically-appropriate --rvr-color-primary and --rvr-color-info variables.

Palette colors aren't ever intended for direct usage in components. Within components, everything should be mapped to a meaningful semantic color variable.

Exceptions
The one thing I overwrote was input:focus's border and glow colors. Since the input focus state is transient and not related to text legibility, I mapped that to our --rvr-primary-hover color instead. The glow looked weird with the dark color.

So focused inputs still look like this:
image

bkonuwa and others added 2 commits May 3, 2021 13:08
* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>
@pixelbandito
Copy link
Contributor Author

Hrm, not sure why this PR shows @bkonuwa's modal changes - I already synced v3-alpha branch with master.

Gonna wait an hour or so and see if Github picks up the updates to this PR - it should only contain 1 commit.

@pixelbandito pixelbandito merged commit 97c2149 into v3-alpha May 10, 2021
@pixelbandito pixelbandito deleted the feature-EVER-13205-a11y-buttons-and-links branch May 10, 2021 17:46
pixelbandito added a commit that referenced this pull request May 17, 2021
* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
pixelbandito added a commit that referenced this pull request May 18, 2021
* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
pixelbandito added a commit that referenced this pull request May 21, 2021
* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
pixelbandito added a commit that referenced this pull request Aug 20, 2021
* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
pixelbandito added a commit that referenced this pull request Aug 24, 2021
* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
ManoloAlvarezForo added a commit that referenced this pull request Sep 16, 2021
* Feature ever 13205 a11y buttons and links (#311)

* feat: Add Modal component (#309)

* feat: Add Modal component

* cleaned up css class names

* add logic to auto focus and focus trapping in the modal

* Add example of Modal usage

* update unit test by adding snapshot to verify the component renders what is expected in the UI

* fix: Modal focus trap works better with keydown listener, add focus trap tests, upgrade testing-library packages

* fix: use userEvent.type to simulate escape key press

* fixed failing test

Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
Co-authored-by: Chris Garcia <pixelbandito@gmail.com>

* feat: EVER-13212: a11y colors for buttons and text links

Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>

* docs: Update changelog, publishing.md

* Merge new features from v3.x to v4-alpha (#339)

* Feature: EVER-13451: Add `Select` component (#325)

* feat: EVER-13451: Initial commit of Select and Select.Option components

* WIP: Keyboard handler for moving selected option focus with up arrow.

* feat: EVER-13451: Up and down arrow keys, validity with hidden native select, break some code into separate hooks

* feat: EVER-13451: Add tests for , make  a child, export from index and import into example app

* feat: EVER-13451: Update jsdom env to sixteen

* feat: EVER-13451: Restore non-clicky style to plain Dropdown.Menu.Item content, style stories a bit

* feat: EVER-13451: Update Dropdown.Menu.Item README

* chore: EVER-13451: Update more tests and snapshots

* v3.1.0 (#338)

Just publishing a new minor version, no diff except the changelog and package.json version number.

* Deploying v4.0.0-alpha.2

Co-authored-by: Chris Garcia <pixelbandito@gmail.com>
Co-authored-by: bkonuwa <bkonuwa@gmail.com>
Co-authored-by: Boima Konuwa <boima.konuwa@cision.com>
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.

2 participants