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

Input Date Picker - Add context to default placeholder text to AT - (2036569968) #5581

Closed
Tracked by #4599
dqateam opened this issue Oct 25, 2022 · 5 comments
Closed
Tracked by #4599
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@dqateam
Copy link
Collaborator

dqateam commented Oct 25, 2022

Module:

17a Input Date Picker

Violation:

Avoid use of placeholder values to label or explain input

image

WCAG Reference:

Instance ID:

2036569968

Severity:

8

Description:

[Issue]
There are form fields that rely on the placeholder attribute to supply their accessible name. Examples include:

  • All input "date-picker" elements.

[User Impact]
Users with cognitive disabilities may be unable to determine the purpose of the field after the placeholder disappears. Some assistive technologies will not use the placeholder attribute as a field's accessible name, so screen reader users will have difficulty determining what fields are for and speech input users will have difficulty navigating to them.

[Code Reference]

<input aria-label="" class="" enterkeyhint="" inputmode="" placeholder="MM/DD/YYYY" type="text">

Note:

[Suggestion]
Avoid use of placeholder values to label or explain input.

Labels must meet the following requirements:

  • The label must be visible.
  • The label must be persistent. That is, a label must not disappear when text is entered into the field or an option is selected.
  • The label must be programmatically associated with the form field. The most common way to do this is with a <label> element with a for attribute set to the ID of the field.
  • The label must provide the accessible name of the field, or the label's exact text must be included in the accessible name.

[Compliant Code Example]

N/A

Media Type:

Forms

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

By default the component has placeholder text MM DD YYYY that is read back to screen readers. Maybe we could change this to read it as the expected format for AT using an aria-label attr?

@geospatialem geospatialem changed the title Input Date Picker - Avoid use of placeholder values to label or explain input - (2036569968) Input Date Picker - Add context to default placeholder text to AT - (2036569968) Nov 18, 2022
@geospatialem geospatialem added the estimate - 2 Small fix or update, may require updates to tests. label Feb 6, 2023
@geospatialem geospatialem added the p - medium Issue is non core or affecting less that 60% of people using the library label Feb 27, 2023
@geospatialem geospatialem removed the needs triage Planning workflow - pending design/dev review. label Feb 27, 2023
@geospatialem geospatialem self-assigned this Apr 4, 2023
@geospatialem geospatialem added research Issues that require more in-depth research or multiple team members to resolve or make decision. 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Apr 4, 2023
@geospatialem
Copy link
Member

Research will be determined in April for next dev steps needed.

@geospatialem
Copy link
Member

geospatialem commented Apr 18, 2023

We should provide context the placeholder text string is the date format, where the format is only provided to screen readers via an aria-describedby attribute and .sr-only class.

Something like:

<calcite-input aria-describedby="input-format" />
  <span id="input-format" class="sr-only">Date format: MM/DD/YYYY</span>

Since the context would need to change depending on the selected locale, there may be a better format to compliment all languages with translation strings.

W3C example: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/#ex_label

cc: #3671 for context to a similar solution when implementing a placeholder for input-time-picker.

@geospatialem geospatialem added estimate - 3 A day or two of work, likely requires updates to tests. and removed research Issues that require more in-depth research or multiple team members to resolve or make decision. estimate - 2 Small fix or update, may require updates to tests. labels Apr 18, 2023
@geospatialem geospatialem removed their assignment Apr 18, 2023
@geospatialem geospatialem added 0 - new New issues that need assignment. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Apr 18, 2023
@anveshmekala anveshmekala self-assigned this Jul 13, 2023
@anveshmekala anveshmekala added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jul 13, 2023
@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Jul 14, 2023
anveshmekala added a commit that referenced this issue Jul 14, 2023
#7320)

**Related Issue:** #5581 

## Summary

This fix will provide placeholder text context for Assistive Technology
users in `calcite-input-date-picker`.
@anveshmekala anveshmekala added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jul 14, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

benelan pushed a commit that referenced this issue Jul 18, 2023
#7320)

**Related Issue:** #5581 

## Summary

This fix will provide placeholder text context for Assistive Technology
users in `calcite-input-date-picker`.
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jul 24, 2023
@geospatialem
Copy link
Member

Verified with NVDA with Firefox and JAWS with Chrome on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

4 participants