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

[Faceted Filters] Price filter input missing accurate accessible name #113

Closed
svinkle opened this issue Jul 6, 2021 · 0 comments · Fixed by #141
Closed

[Faceted Filters] Price filter input missing accurate accessible name #113

svinkle opened this issue Jul 6, 2021 · 0 comments · Fixed by #141
Labels
Category: Accessibility Bugs found while using assistive technology Category: Bug Something isn't working Severity: 1 Urgent Severity

Comments

@svinkle
Copy link
Member

svinkle commented Jul 6, 2021

Issue summary

The Price facet input elements do not feature a programmatically associated label to describe their purpose. Currently the placeholder attribute is used as the accessible name. As a result, there is an incorrect description announced on focus. This could lead to a confusing or frustrating user experience for screen reader or voice dictation users who rely on accurate labelling.

Screenshots Screen shot of faceted filters section. Price filter is expanded, input controls are highlighted.

Current code

HTML

<input
  class="field__input"
  name="filter.v.price.gte"
  id="Filter-Price-4"
  type="number"
  placeholder="0"
  min="0"
  max="615.00"
/>
<label
  class="field__label"
  for="Search-In-Modal"
>
  From
</label>

<!-- … -->

<input
  class="field__input"
  name="filter.v.price.lte"
  id="Filter-Price-4"
  type="number"
  placeholder="615.00"
  min="0"
  max="615.00"
/>
<label
  class="field__label"
  for="Search-In-Modal"
>
  To
</label>

Steps to reproduce

  1. Go to a collection page with Dawn theme with any supported browser.
  2. Activate the Price facet filter control.
  3. With an active screen reader, navigate to the input controls.

Behavior

Expected

  • input to be accompanied by a descriptive accessible name.

Actual

  • input accessible name/label association are inaccurate.

Recommendation

  1. Supply a unique id for each input control.
  2. Adjust the for attribute value to match the id of the associated input.

Recommended code

HTML

<input
  class="field__input"
  name="filter.v.price.gte"
  id="Filter-Price-GTE"
  type="number"
  placeholder="0"
  min="0"
  max="615.00"
/>
<label
  class="field__label"
  for="Filter-Price-GTE"
>
  From
</label>

<!-- … -->

<input
  class="field__input"
  name="filter.v.price.lte"
  id="Filter-Price-LTE"
  type="number"
  placeholder="615.00"
  min="0"
  max="615.00"
/>
<label
  class="field__label"
  for="Filter-Price-LTE"
>
  To
</label>

Specifications

@svinkle svinkle added Severity: 1 Urgent Severity Category: Bug Something isn't working Category: Accessibility Bugs found while using assistive technology labels Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Accessibility Bugs found while using assistive technology Category: Bug Something isn't working Severity: 1 Urgent Severity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant