brianblakely / nodep-date-input-polyfill

Automatically adds datepickers to input[type=date] on IE, macOS Safari, and legacy browsers.
https://www.npmjs.com/package/nodep-date-input-polyfill
MIT License
96 stars 137 forks source link

WCAG 2.0 accessibility issue. "Label text is empty" #64

Open scrawlon opened 6 years ago

scrawlon commented 6 years ago

The date-input-polyfill adds two select inputs 'yearSelect' and 'monthSelect' without labels. This triggers an "Label text is empty" error in a WCAG 2.0 accessibility tester.

screen shot 2018-11-15 at 9 51 21 pm

I was able to fix this by adding - aria-hidden='true' - to the date-input-polyfill element. This hides the date picker from screen readers.