Remove the navigation role from navbar examples

"Using the <nav> element will automatically communicate a section has a role of navigation. Developers should always prefer using the correct semantic HTML element over using ARIA"
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/navigation_role#description
This commit is contained in:
Miles Barr 2024-10-23 08:03:07 -07:00 committed by GitHub
parent 3b63997ad2
commit 5b69e64bc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ modals:
--- ---
{% capture navbar_basic_example %} {% capture navbar_basic_example %}
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="{{ site.url }}"> <a class="navbar-item" href="{{ site.url }}">
{% include svg/bulma-logo.html %} {% include svg/bulma-logo.html %}
@ -87,7 +87,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_brand_example %} {% capture navbar_brand_example %}
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<!-- navbar items, navbar burger... --> <!-- navbar items, navbar burger... -->
</div> </div>
@ -113,7 +113,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_brand_items_example %} {% capture navbar_brand_items_example %}
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="{{ site.url }}"> <a class="navbar-item" href="{{ site.url }}">
{% include svg/bulma-logo.html %} {% include svg/bulma-logo.html %}
@ -130,7 +130,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_menu_example %} {% capture navbar_menu_example %}
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<!-- navbar items, navbar burger... --> <!-- navbar items, navbar burger... -->
</div> </div>
@ -222,7 +222,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_example %} {% capture navbar_dropdown_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<div class="navbar-item has-dropdown"> <div class="navbar-item has-dropdown">
<a class="navbar-link"> <a class="navbar-link">
Docs Docs
@ -254,7 +254,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_hover_example %} {% capture navbar_dropdown_hover_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link"> <a class="navbar-link">
Docs Docs
@ -286,7 +286,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_active_example %} {% capture navbar_dropdown_active_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<div class="navbar-item has-dropdown is-active"> <div class="navbar-item has-dropdown is-active">
<a class="navbar-link"> <a class="navbar-link">
Docs Docs
@ -318,7 +318,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_right_example %} {% capture navbar_dropdown_right_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<div class="navbar-menu"> <div class="navbar-menu">
<div class="navbar-start"> <div class="navbar-start">
<div class="navbar-item has-dropdown is-active"> <div class="navbar-item has-dropdown is-active">
@ -407,7 +407,7 @@ modals:
</div> </div>
</section> </section>
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<div class="navbar-menu"> <div class="navbar-menu">
<div class="navbar-start"> <div class="navbar-start">
<div class="navbar-item has-dropdown has-dropdown-up is-active"> <div class="navbar-item has-dropdown has-dropdown-up is-active">
@ -437,7 +437,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_default_example %} {% capture navbar_dropdown_default_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<a class="navbar-item"> <a class="navbar-item">
{% include svg/bulma-logo.html %} {% include svg/bulma-logo.html %}
</a> </a>
@ -478,7 +478,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_boxed_example %} {% capture navbar_dropdown_boxed_example %}
<nav class="navbar is-transparent" role="navigation" aria-label="dropdown navigation"> <nav class="navbar is-transparent" aria-label="dropdown navigation">
<a class="navbar-item"> <a class="navbar-item">
{% include svg/bulma-logo.html %} {% include svg/bulma-logo.html %}
</a> </a>
@ -519,7 +519,7 @@ modals:
{% endcapture %} {% endcapture %}
{% capture navbar_dropdown_item_active_example %} {% capture navbar_dropdown_item_active_example %}
<nav class="navbar" role="navigation" aria-label="dropdown navigation"> <nav class="navbar" aria-label="dropdown navigation">
<a class="navbar-item"> <a class="navbar-item">
{% include svg/bulma-logo.html %} {% include svg/bulma-logo.html %}
</a> </a>