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

Accessibility: Drag handle accessibility and usability #22817

Open
MaximKipot opened this issue Mar 16, 2020 · 2 comments
Open

Accessibility: Drag handle accessibility and usability #22817

MaximKipot opened this issue Mar 16, 2020 · 2 comments
Labels
area/dashboard area/frontend area/panel/common help wanted type/accessibility Accessibility problem / enhancement wcag/1.4.11 UI and graphical objects have a color contrast ratio of at least 3:1

Comments

@MaximKipot
Copy link
Contributor

A drag handle on a grid item which appears on hover is visible and accessible in terms of contrast colors only if a corresponding bg color of a grid item is provided.

Steps to reproduce:
hover with a mouse over any grid item / panel in the main area of the interface.

Actual Result:
Screenshot 2020-03-16 at 19 36 12
Screenshot 2020-03-16 at 15 59 56

Expected Result
Screenshot 2020-03-16 at 19 37 51
Screenshot 2020-03-16 at 19 37 25
Screenshot 2020-03-16 at 19 37 02

The implementation would look like:

.theme-dark {
  .react-grid-item > .react-resizable-handle::after {
    border-right-color: #989898;
    border-bottom-color: #989898;
    width: 10px;
    height: 10px;
  }
  .react-grid-item > .react-resizable-handle {
    width: 24px;
    height: 24px;
    background: linear-gradient(
        to bottom right,
        transparent 0%,
        transparent 50%,
        lighten($panel-corner, 6%) 50%,
        lighten($panel-corner, 6%) 100%
    );
  }
}

Relevant WCAG Criteria:
[1.4.3 WCAG Criterion](link to https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast)

Environment:

  • Grafana version: 6.7.0-pre
  • Data source type & version: TestData DB coming with Simple dummy streaming example
  • User OS & Browser: MacOS Mojave, Mozilla and Chrome
@torkelo torkelo added the type/accessibility Accessibility problem / enhancement label Mar 16, 2020
@torkelo torkelo changed the title Drag handle accessibility and usability Accessibility: Drag handle accessibility and usability Mar 16, 2020
@torkelo
Copy link
Member

torkelo commented Mar 16, 2020

good suggestion!

@MaximKipot
Copy link
Contributor Author

Same goes for light theme:

.theme-light {
  .react-grid-item > .react-resizable-handle::after {
    border-right-color: #606268;
    border-bottom-color: #606268;
  }
  .react-grid-item > .react-resizable-handle {
    background: linear-gradient(
      to bottom right,
      transparent 0%,
      transparent 50%,
      lighten($panel-corner, 6%) 50%,
      lighten($panel-corner, 6%) 100%
    );
  }
}

Colors used to depict a handle triangle are having enough contrast to be accessible

@ckbedwell ckbedwell added the wcag/1.4.11 UI and graphical objects have a color contrast ratio of at least 3:1 label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard area/frontend area/panel/common help wanted type/accessibility Accessibility problem / enhancement wcag/1.4.11 UI and graphical objects have a color contrast ratio of at least 3:1
Projects
None yet
Development

No branches or pull requests

3 participants