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

Allowing main element as well as main role #336

Closed
wants to merge 1 commit into from

Conversation

votemike
Copy link

@votemike votemike commented May 27, 2021

Summary

Allow <main> as well as <element role="main'> as this is even more valid.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Main_role

The <main> element has a role of main.

Details

Also changed message to that people are aware they can use the <main> element.

Motivation and Context

NextJS uses a <main> element by default, but bbc-a11y does not like that there is no role="main"

How Has This Been Tested?

Added/updated tests

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@andymsuk
Copy link
Contributor

Hi @votemike

Thanks for your PR! This kind of change has been suggested before in #328 but it was declined - see that PR for reasoning.

@EmmaJP & @JamieKnightBBC - Can I check our position hasn't changed on requiring role="main" and not just accepting <main>?

@votemike
Copy link
Author

I see. That's a pain. It seems like that is because <main> is an HTML 5 element that IE11 doesn't understand (and therefore doesn't apply the role to).
However, that means that in order for any website to use the bbc-a11y tool, they have to comply with the minimum browser requirements as set by the tool. I think it should be optional.
Would there be scope for options to be passed in to the tool surrounding minimum browser requirements?
And if you'd like another reason... I've heard they're sunsetting Internet Explorer entirely.

@EmmaJP
Copy link
Contributor

EmmaJP commented Jun 3, 2021

We actually looked at this again fairly recently, when updating the HTML guidance (refer https://www.bbc.co.uk/accessibility/forproducts/guides/html/landmarks/) and our conversation still steered us toward including the explicit role attribute and not solely relying on support for the native element.

Hopefully at some point in the not too distant future all browsers the BBC has to be mindful of will have full support of the native elements, as the older browsers become less used.

@votemike
Copy link
Author

votemike commented Jun 9, 2022

Support for IE11 (and all IEs) runs out next Wednesday on June 15, 2022. https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/

Is it worth reviewing this now?

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Aug 12, 2023
@votemike
Copy link
Author

@EmmaJP @andymsuk could we merge this now the IE support has run out?

@andymsuk
Copy link
Contributor

Hi @votemike,

@EmmaJP and I both no longer work for BBC so we no longer maintain this repo.

@nicholasgriffintn - are you contributing to this repo now? Do you know who else is maintaining?

@nicholasgriffintn
Copy link
Member

@nicholasgriffintn - are you contributing to this repo now? Do you know who else is maintaining?

I'm not contributing directory no, just sorted out some of the contributing stuff and the CI, there are a few talks about this repo internally going on, I'm not sure about if this is going to happen or not, at all tbh.

@github-actions github-actions bot removed the Stale label Aug 15, 2023
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@nicholasgriffintn
Copy link
Member

Looking at out guidelines: https://www.bbc.co.uk/accessibility/forproducts/guides/html/landmarks/

role="main" is still required (in the testing section) and it has to abide by those, so unless that gets updated, I don't think this will be a change that can be merged, independent of IE support.

Rather than keeping this PR alive by removing the stale label, I've created a discussion for it here: #372

@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants