- πΊπΈUnited States morganlyndel
I tested this patch on an environment that had previously been receiving the "`[aria-*]` attributes do not match their roles" error and confirm that this error went away once the patch was applied.
Steps to test:
- Discover the "`[aria-*]` attributes do not match their roles" error on a site during a Lighthouse scan (recreate the error).
- Download the patch attached to this issue and apply it using composer.
- Clear the cache, then re-run the Lighthouse scan on the offending page.
- Confirm that the error is no longer present on the site.
Thank you!
- Status changed to Needs review
over 1 year ago 5:58pm 15 June 2023 - π·πΈSerbia pivica
Checked related documentation for this. Removing aria-label will fix this issue, but information in that label is lost, and it is not used at all any more. So if we want to go this route then we should also remove extlink_label and extlink_mailto_label configurations.
Instead of this we can move aria-label to link wrapper, as suggested in section 'aria-label in links'.
Then for font icons we should use role="img" and aria-hidden="true" as suggested in 'Simple approach' and 'Visual but accessible icon' and Semantically identifying a font icon with role="img".
With this new approach the assistive technology browser will ignore the icon and will read the link like "link Drupal link is external".
Instead of moving aria-label to a link tag, we could also leave it in a span, add a new span and hide it with visually-hidden CSS rule. For me aria-label looks as a more elegant solution.
Here is a patch with a new approach.
- Status changed to Needs work
5 months ago 11:58pm 25 June 2024 - πΊπΈUnited States smustgrave
Can the issue summary be updated using standard template.
- Status changed to Postponed: needs info
5 months ago 11:28pm 26 June 2024 - πΊπΈUnited States smustgrave
Need an issue summary update to understand what's being fixed exactly.
- Status changed to Closed: outdated
4 months ago 8:13pm 15 July 2024 - Status changed to Needs work
4 months ago 10:09pm 15 July 2024 - πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
Re-opening and did my best with issue summary. This is still an issue, and we have been using patch at #0 in production for a long time.
- πΊπΈUnited States katannshaw
Added "Related WCAG success criteria and techniques" to issue description to provide context and clarity.
- Status changed to Needs review
3 months ago 10:09pm 7 August 2024 - π·πΈSerbia pivica
Updated patch from #4 against latest 2.0.x-dev. There were quite a few changes from 8.x-1.x-dev JS version of the code. I've also reused `drupalSettings.data.extlink.extHideIcons` option for aria-hidden value as the code is already doing it for embedded images.
Attaching also patch version for 2.0.0-beta1 version so we can use this with composer build easily.
- Status changed to Needs work
3 months ago 10:13pm 7 August 2024 - Merge request !34For FA icons move aria-label into link wrapping element and add role=img and... β (Closed) created by pivica
- Status changed to Needs review
3 months ago 10:33pm 7 August 2024 -
smustgrave β
committed c9497631 on 2.0.x
Issue #3275748 by pivica, randy Tang, penyaskito, morganlyndel,...
-
smustgrave β
committed c9497631 on 2.0.x
- Status changed to Fixed
3 months ago 11:33pm 7 August 2024 - Status changed to Needs review
3 months ago 11:42am 8 August 2024 - π·πΈSerbia pivica
Sorry, needs to reopen this because I introduced a small bug in previous MR. There is a double quote bug for a tel element on line 362:
iconElement.innerHTML = `<span class="${drupalSettings.data.extlink.extFaTelClasses}" data-extlink-placement="${iconPlacement}""></span>`;
New MR !35 should fix this.
Also attaching a updated patch for 2.0.0-beta1.
- Status changed to Fixed
3 months ago 1:21pm 8 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.