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

Dropdown, Dropdown Group, Dropdown - Ensure all interactive functionality is operable with the keyboard - (2047838678) #5637

Closed
Tracked by #4599
dqateam opened this issue Oct 25, 2022 · 2 comments
Labels
0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. docs Issues relating to documentation updates only. needs triage Planning workflow - pending design/dev review.

Comments

@dqateam
Copy link
Collaborator

dqateam commented Oct 25, 2022

Module:

43 Dropdown, Dropdown Group, Dropdown

Violation:

Ensure all interactive functionality is operable with the keyboard

WCAG Reference:

Instance ID:

2047838678

Severity:

8

Description:

Div Trigger
Grassland Forest Trail Park Lake Mountain River

Note:

This does not respond to enter or space

Media Type:

Keyboard Accessibility

Additional Resources:

  • Report Source: Product accessibility evaluation conducted on the Calcite Design System in August, 2022.
@dqateam dqateam added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Oct 25, 2022
@geospatialem
Copy link
Member

Might be out of scope for the component, but helpful in updating the documentation so developers ensure any use cases where a custom element is used (such as a div), accessibility must be carried out.

For instance, updating the code to accommodate for keyboard users:

html:

<h3>Div triggered dropdown</h3>
<calcite-dropdown>
  <div slot="dropdown-trigger" appearance="solid" tabindex="0" onkeypress="openDropdown(event)" onClick="openDropdown(event)">Div Trigger</div>
  <calcite-dropdown-group group-title="Div trigger">
    <calcite-dropdown-item>Grassland</calcite-dropdown-item>
    <calcite-dropdown-item active>Forest</calcite-dropdown-item>
    <calcite-dropdown-item>Trail</calcite-dropdown-item>
    <calcite-dropdown-item>Park</calcite-dropdown-item>
    <calcite-dropdown-item>Lake</calcite-dropdown-item>
    <calcite-dropdown-item>Mountain</calcite-dropdown-item>
    <calcite-dropdown-item>River</calcite-dropdown-item>
  </calcite-dropdown-group>
</calcite-dropdown>

javascript:

const dropdown = document.querySelector("calcite-dropdown");

function openDropdown(event) {
  if (
    (event.type === "keypress" && event.key === " ") ||
    (event.type === "keypress" && event.key === "Enter")
  ) {
    dropdown.toggleAttribute("open");
  }
}

@geospatialem geospatialem added docs Issues relating to documentation updates only. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. labels Oct 26, 2022
@geospatialem
Copy link
Member

Closing in favor of the created documentation issues to come to a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. docs Issues relating to documentation updates only. needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

2 participants