minor #37372 Avoid accessibility errors on symfony web debug toolbar (alexander-schranz)

This PR was merged into the 3.4 branch.

Discussion
----------

Avoid accessibility errors on symfony web debug toolbar

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

When for example using the [axe](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd) to test the website for accessibility. Axe will fail because a div element without a role or a parent [landmark](https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html) is rendered. To avoid this errors I think we should define it as a specific region.

Commits
-------

223b405168 Avoid accessibility errors on debug toolbar
This commit is contained in:
Fabien Potencier 2020-06-22 10:10:20 +02:00
commit 3aa7426ec2
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<div id="sfwdt{{ token }}" class="sf-toolbar sf-display-none"></div>
<div id="sfwdt{{ token }}" class="sf-toolbar sf-display-none" role="region" aria-label="Symfony Web Debug Toolbar"></div>
{{ include('@WebProfiler/Profiler/base_js.html.twig') }}
<style{% if csp_style_nonce %} nonce="{{ csp_style_nonce }}"{% endif %}>
{{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }}