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

HTML validation error: 'The group role is unnecessary for element fieldset' in date input #1590

Closed
hannalaakso opened this issue Sep 23, 2019 · 2 comments

Comments

@hannalaakso
Copy link
Member

hannalaakso commented Sep 23, 2019

What

We set role="group" on the fieldset of the date input component.

The W3C Markup Validator flags it as warning

The group role is unnecessary for element fieldset.

It seems it was added to improve accessibility with Jaws
#681 (comment) and 759fd5a

I’ve done some preliminary testing as part of documenting warnings. I did this with the error message present on the page as the comments suggest that was part of the initial problem. I found no difference in announcements with Jaws 15, Jaws 2018 or NVDA with Firefox with/without role="group". However in Jaws 16 the addition of role="group" made the announcements less helpful:

  • with role="group", Jaws announced “day edit type of text”
  • without role="group", “expiry date day edit type of text”

I also tested in Jaws 15, 16 and 2018 by skim reading the page (Ctrl+Insert+PageDown) and didn't hear any difference with role="group" present/removed.

We should do a bit more testing as my initial investigation might have not covered all the possible scenarios.

Why

Who needs to be involved in this

Developers

Done when

@hannalaakso hannalaakso added the awaiting triage Needs triaging by team label Sep 23, 2019
@kellylee-gds kellylee-gds added Effort: days and removed awaiting triage Needs triaging by team labels Oct 2, 2019
@hannalaakso
Copy link
Member Author

hannalaakso commented Feb 10, 2020

We did some testing:

While role="group" seems to make no difference in most cases, we did find that:

  • Using role="group" makes Jaws 2020, 17, 18 in IE11 read out the hint and error message.

  • Removing role="group" makes Jaws 16 and IE11 read out the question.

@hannalaakso hannalaakso self-assigned this Feb 10, 2020
@hannalaakso
Copy link
Member Author

hannalaakso commented Feb 12, 2020

Based on our testing we've decided to keep this attribute as it improves IE11 for JAWs users: they will hear the hint and error message being read out.

We'll review this if anything changes.

@36degrees 36degrees changed the title Investigate removing role=“group” from date input fieldset HTML5 validation error: 'The group role is unnecessary for element fieldset' in date input Jul 4, 2022
@36degrees 36degrees changed the title HTML5 validation error: 'The group role is unnecessary for element fieldset' in date input HTML validation error: 'The group role is unnecessary for element fieldset' in date input Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants