-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Guidelines: WCAG 2.0 (Level AA) not followed for ngb date-picker #2543
Comments
website used for checking : https://achecker.ca/ you can use the html from this link to reproduce the error : |
An option would be to add a title something like: <select title="months"></select>
<select title="years"></select> But these strings should be added to i18n in this case |
@maxokorokov : But these strings should be added to i18n in this case? |
This is what my code looks like: and here is dynamically generated DOM elements for date-picker, which are clearly missing labels for select boxes used for month and year selection : which violates the WCAG 2.0 guild lines which states : Check 91: select element missing an associated label |
@kedar9444, sure, I see the problem, it was clear from the description. Adding the
Just wanted to say that if we put a hardcoded string as a select box title, we should not forget to translate it. |
@maxokorokov : yes, got it. |
@maxokorokov |
@pkozlowski-opensource how we plan to add area-label or title to dynamically generated 'SELECT' element. Because we can't do it from HTML as we can only add ngb-datepicker and available inputs to pass. |
By the way, adding |
@maxokorokov how did you add area-label, can you share HTML snippet ? |
@maxokorokov : adding title along with aria-label solves the problem for achecker.ca |
Fixed through #2636, will be part of a next release. |
thanks a lot folks. ❤️❤️❤️ |
Bug description: The auto generated select fields for month and year violates the WCAG 2.0 (Level AA) guidelines.
Error code : Check 91: select element missing an associated label.
Repair: Add a label element that surrounds the control's label. Set the for attribute on the label element to the same value as the id attribute of the control. And/or add a title attribute to the input element. And/or create a label element that contains the input element.
since the html is auto-generated we can not add the label for it.
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: "^5.1.3"
ng-bootstrap: "1.1.0"
Bootstrap: "4.0.0"
The text was updated successfully, but these errors were encountered: