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

Color Viewer Slider Example Update (slider-1) #1472

Closed
wants to merge 47 commits into from
Closed

Conversation

jongund
Copy link
Contributor

@jongund jongund commented Jul 27, 2020

This is an updated version of the slider 1 example for picking a color.

New features include:

  1. Javascript file that uses a single prototype object for the example.
  2. Use SVG graphics for buttons, thumbs and rail.
  3. Improve high contrast support through use of inline SVG graphics.

Preview Link

Color Viewer Slider Example

Review checklist

@jongund jongund changed the title updated slider-1 example for high contrast and mobile support updated color picker slider example: High Contrast, APG Coding Practices and Mobile Support Aug 4, 2020
@jongund jongund changed the title updated color picker slider example: High Contrast, APG Coding Practices and Mobile Support Updated color picker slider example: High Contrast, APG Coding Practices and Mobile Support Aug 4, 2020
@mcking65 mcking65 changed the title Updated color picker slider example: High Contrast, APG Coding Practices and Mobile Support Color Picker Slider Example: Improve high contrast support, Conformance with APG coding practices, and mobile support Sep 1, 2020
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

code review: I only have SUPER minor comments on the code review, this looks really good! But please do delete the old javascript and css files (slide.js and slider.css) in this PR, and consider the other comments. This is otherwise an approving code review.

test review: The tests as they are look really good, but it does seems like there is a quite a bit of mouse-user functionality that is not tested. We aren't requiring tests of mouse behavior that in the test review right now, but maybe we should make a backlog task for this to not loose track of untested functionality for these widgets?

examples/slider/slider-1.html Outdated Show resolved Hide resolved
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Horizontal Slider Example | WAI-ARIA Authoring Practices 1.2</title>
<title>Color Picker Slider Example Using SVG | WAI-ARIA Authoring Practices 1.1</title>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really 1.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

examples/slider/js/slider-1.js Outdated Show resolved Hide resolved
examples/slider/js/slider-1.js Outdated Show resolved Hide resolved

ColorPickerSliders.prototype.moveSliderTo = function (slider, value) {

console.log('[moveSliderTo][slider]: ' + slider.sliderNode.classList);
Copy link
Contributor

Choose a reason for hiding this comment

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

this console log too -- if it's just for debugging I'd remove it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@jongund
Copy link
Contributor Author

jongund commented Sep 3, 2020

@spectranaut
Valerie, thank you for the feedback on the code, I have updated the example with your suggested changes.

Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

Looks great! :)

text-align: center;
padding: 0.25em;
}

Copy link
Member

Choose a reason for hiding this comment

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

Suggest adding
.color-box {
forced-color-adjust: none;
}
so the color box renders the actual color even in high contrast mode.

<h2 id="id-color-picker">Color Viewer</h2>
<div id="id-red" class="label">Red</div>
<div class="color-group red">
<button class="change dec10" aria-label="decrement red ten" tabindex="-1">
Copy link
Member

Choose a reason for hiding this comment

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

Would aria-label be better as "decrease red by 10"? (and similar for all the others?)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2020

Regression test coverage:

Examples without any regression tests:

  • dialog-modal/alertdialog.html

Examples missing some regression tests:

  • dialog-modal/datepicker-dialog.html:
    • textbox-aria-describedby
  • menu-button/menu-button-actions-active-descendant.html:
    • menu-up-arrow
    • menu-down-arrow
    • menu-character
  • slider/slider-color-viewer-mobile.html:
    • group-aria-labelledby
  • slider/slider-color-viewer.html:
    • group-aria-labelledby
    • button-aria-label
    • button-tabindex
  • toolbar/toolbar.html:
    • toolbar-tab
    • toolbar-right-arrow
    • toolbar-left-arrow
    • toolbar-home
    • toolbar-end
    • toolbar-toggle-esc
    • toolbar-toggle-enter-or-space
    • toolbar-radio-enter-or-space
    • toolbar-radio-down-arrow
    • toolbar-radio-up-arrow
    • toolbar-button-enter-or-space
    • toolbar-menubutton-enter-or-space-or-down-or-up
    • toolbar-menu-enter-or-space
    • toolbar-menu-down-arrow
    • toolbar-menu-up-arrow
    • toolbar-menu-escape
    • toolbar-spinbutton-down-arrow
    • toolbar-spinbutton-up-arrow
    • toolbar-spinbutton-page-down
    • toolbar-spinbutton-page-up
    • toolbar-checkbox-space
    • toolbar-link-enter-or-space
    • toolbar-spinbutton-role

Example pages with Keyboard or Attribute table rows that do not have data-test-ids:

  • dialog-modal/alertdialog.html
    • "Keyboard Support" table(s):
      • Tab
      • Shift + Tab
      • Escape
      • Command + S
      • Control + S
    • "Attributes" table(s):
      • alertdialog
      • aria-labelledby=IDREF
      • aria-describedby=IDREF
      • aria-modal=true
      • alert

SUMMARY:

56 example pages found.
1 example pages have no regression tests.
5 example pages are missing approximately 31 out of approximately 804 tests.

ERROR - missing tests:

Please write missing tests for this report to pass.

@carmacleod carmacleod self-requested a review October 27, 2020 18:41
@jongund
Copy link
Contributor Author

jongund commented Jan 7, 2021

@spectranaut @nschonni @mcking65
One of the checks for color viewer example is failing because it said I modified "examples\index.html", you can see from the files changed that I am not modifying "examples/index.html". How does this get fixed?

@nschonni
Copy link
Contributor

nschonni commented Jan 7, 2021

Run npm run reference-tables to update the examples index.html with the new file names

@jongund
Copy link
Contributor Author

jongund commented Jan 7, 2021

Run npm run reference-tables to update the examples index.html with the new file names

@nschonni
Thank you for quick response.
I tried running the command and it did say in "generating index" but it didn't change the examples/index.html file (or anything else as far as I can tell), so no changes to commit.

@jongund
Copy link
Contributor Author

jongund commented Jan 7, 2021

@nschonni
Looks like the problem fixed itself, it's not reporting a code issue anymore.

@nschonni
Copy link
Contributor

nschonni commented Jan 7, 2021

@jongund there is also a pre-commit hook now, so it looked like it regenerated itself in 403645e

@jongund jongund requested a review from charmarkk January 8, 2021 01:11
Copy link
Contributor

@charmarkk charmarkk left a comment

Choose a reason for hiding this comment

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

Tested with Windows 10, NVDA 2020.3, JAWS 2020.2012.13; Firefox 84.0.1 and Chrome 87.0.4280.141. All worked as expected as far as documented accessibility functionality, keyboard interaction, Windows HCM, and screen readers were concerned.

@carmacleod, could I tag you in for MacOS a11y tests? My test Mac is with another co-worker at the moment.

@a11ydoer
Copy link
Contributor

a11ydoer commented Jan 11, 2021

Since @charmarkk did functionality review agaist on non iOS devices, I only check color picker slider example with mobile support with iphone, iOS VoiceOver

The slider itself works well by annoucing current value or changed value with gesture (See the screen shot with VoiceOver text output).

Question is on increase/decrease button. For example, when "increase red by ten" is touched with gesture, the value changed accordingly. (See the screen shot with VoiceOver text output). However, the changed value itself is not announced although visual user can see the color change in the Color view box. @jongund Should we announce changed current value with button action or it is not necessary?

@a11ydoer
Copy link
Contributor

focus on increase red by ten but it does not annonce the chaged value
focus on red slider - announce the value correctly with gesture

@a11ydoer
Copy link
Contributor

Regarding visual design review, we do not have much option since APG examples are not responsive yet. Furthermore, other color picker design examples tend to be 3 dimensional which is complex to implement in terms of accessiblity. (See the screen shot of "color zilla" example, the circle with RGB color combination) Therefore, current color picker implementation with 2D linear slider design is acceptable.
color picker tool with 3d circle RGB color

@jongund jongund changed the title Color Picker Slider Example: Improve high contrast support, Conformance with APG coding practices, and mobile support Color Picker Slider Example: Improve high contrast support, Conformance with APG coding practices Jan 12, 2021
@jongund
Copy link
Contributor Author

jongund commented Jan 13, 2021

@nschonni @mcking65
The same problem as the other pull request I had last week, it is finding a problem in the examples/index.html file that I did not modify in the in this pull request.

@nschonni
Copy link
Contributor

You deleted files so the index.html is out out of sync. Last time it got regenerated by the pre-commit hook during an unrelated changed, but you can run the script from the previous comment to do it

@jongund jongund changed the title Color Picker Slider Example: Improve high contrast support, Conformance with APG coding practices Color Viewer Slider example update Jan 13, 2021
@jongund jongund changed the title Color Viewer Slider example update Color Viewer Slider Example Update Jan 13, 2021
@jongund
Copy link
Contributor Author

jongund commented Jan 14, 2021

@mcking65
I have removed the color viewer mobile example from this pull request and updated the accessibility documentation. So it is ready for editorial review.

@jongund jongund changed the title Color Viewer Slider Example Update Color Viewer Slider Example Update (slider-1) Jan 14, 2021
@jongund
Copy link
Contributor Author

jongund commented Feb 2, 2021

This pull request is superseded by pull #1746.

@jongund jongund closed this Feb 2, 2021
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.

7 participants