You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The role attribute is not required in this instance, as the image is not masquerading as another element, making role redundant.
Expected behavior
That the generated markup via the script isn't unnecessarily adding attributes.
Current behavior
The role attribute does not need to be added to images, as role="image" or role="auto". The only time a role attribute is required is to tell the browser that the current element is a particular function, or if the current element is masquerading as another element, for e.g. a link being a button.
Minimal example reproducing the issue
No response
Environment
Leaflet version: 1.9
Browser (with version): Chrome (latest), but irrelevant in this case.
OS/Platform (with version): Linux
The text was updated successfully, but these errors were encountered:
@diemendesignauto is an invalid role value. Which URL did you analyze? Do you have a screenshot of the PageSpeed Insights results? Was a plugin in use?
Checklist
Steps to reproduce
When running page speed insights, the following is reported as an accessibility error on the role attribute being set to auto:
<img src="[URL]" class="leaflet-marker-icon leaflet-zoom-animated leaflet-interactive" alt="Marker" tabindex="0" role="auto" style="margin-left: -12px; margin-top: -41px; width: 25px; height: 41px;">
The role attribute is not required in this instance, as the image is not masquerading as another element, making role redundant.
Expected behavior
That the generated markup via the script isn't unnecessarily adding attributes.
Current behavior
The role attribute does not need to be added to images, as
role="image"
orrole="auto"
. The only time a role attribute is required is to tell the browser that the current element is a particular function, or if the current element is masquerading as another element, for e.g. a link being a button.Minimal example reproducing the issue
No response
Environment
The text was updated successfully, but these errors were encountered: