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(color-slider): sp-color-slider fails to announce new value on change after keydown #3303 #3304

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

majornista
Copy link
Contributor

Description

Related issue(s)

Motivation and context

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@majornista majornista added a11y Issues related to accessibility Component: Color slider bug Something isn't working labels Jun 9, 2023
@majornista majornista requested a review from Westbrook June 12, 2023 18:26
@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Tachometer results

Chrome

color-slider permalink

Version Bytes Avg Time vs remote vs branch
npm latest 434 kB 145.06ms - 146.26ms - faster ✔
0% - 2%
0.08ms - 2.35ms
branch 433 kB 145.91ms - 147.85ms slower ❌
0% - 2%
0.08ms - 2.35ms
-
Firefox

color-slider permalink

Version Bytes Avg Time vs remote vs branch
npm latest 434 kB 397.07ms - 424.73ms - unsure 🔍
-5% - +5%
-22.22ms - +18.86ms
branch 433 kB 397.40ms - 427.76ms unsure 🔍
-5% - +5%
-18.86ms - +22.22ms
-

@majornista majornista requested a review from Westbrook July 10, 2023 18:33
@Westbrook Westbrook force-pushed the Issue-3303-color-slider-a11y branch from 9767fd8 to d705c44 Compare July 11, 2023 01:39
@@ -350,7 +363,8 @@ describe('ColorSlider', () => {

await elementUpdated(el);

expect(el.sliderHandlePosition).to.equal(20);
expect(el.sliderHandlePosition).to.equal((20 * 100) / 360);
Copy link
Contributor

Choose a reason for hiding this comment

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

I was gonna merge this through, but JS is having a JS moment on this value not equaling itself. The uniformity here made it nicer to read and easier to understand. I'm gonna check around for a similar alternative, but this PR is good to go, otherwise.

@Westbrook Westbrook force-pushed the Issue-3303-color-slider-a11y branch from d705c44 to d81e9d5 Compare July 11, 2023 15:15
Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

approximately is not my favorite, but it does right by this specific test context and allow for all of the tests to be written in the same format. Thanks for getting this in!!

@Westbrook Westbrook merged commit d70d0ae into main Jul 11, 2023
@Westbrook Westbrook deleted the Issue-3303-color-slider-a11y branch July 11, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to accessibility bug Something isn't working Component: Color slider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][a11y]: ColorSlider fails to announce new value on change after a keydown event
2 participants