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
Geomap datatable aria label issue #9730
Comments
This appears to be a timing issue, and happens intermittently. If wb-tables completes before wb-geomap(specifically the legend), then the legend gets the aria-label of the table for the title. If wb-geomap completes first, it gets the correct title, as wb-tables changes the aria-label to the language of i18n. I see a couple of solutions:
Hopefully this helps. |
Thanks @mercury64. Just one addition/correction that it appears to be an issue on pages with just one map and table as well, unless something else is at play here: https://parks.canada.ca/culture/designation/phare-lighthouse As you pointed out it works correctly on some refreshes, but on others it does pull in the aria-label as well. |
This is a timing issue then, not because multiple tables on same page. This fixes the issue line 252:
I'm not sure if this breaks accessibility testing, or if all tables must have the default tblFilterInstruction. I would assume that if the html table aria-label is set, the plugin should not change that. The plugin should only add the default aria-label only if the aria-label is not set in the html table. |
I used this code to debug:
Javascript console output with page incorrectly displaying:
Javascript console output with page correctly displaying:
Hopefully that can help more. |
Hi all,
I'm not sure when exactly it started occurring, but fairly recently it seems that Geomap popups are showing a new (less than useful) heading for popups.
From the Geomap example page:
My assumption on issue:
DataTables likely was updated recently to set an aria-label of "This table provides a sorting feature...", unfortunately, this field is also used by Geomaps to populate the popup's heading/title. It also seems that this aria-label overrides any set in the HTML/before WET initialization.
For example, the raw source of the default layer is:
<table id="cities" aria-label="Points" class="table wb-tables">
which is replaced with<table id="cities" aria-label="This table provides a sorting feature via the buttons across the column header row with only one instance visible at a time." class="table wb-tables wb-init wb-tables-inited dataTable no-footer".....
on initialization.
Thanks so much!
The text was updated successfully, but these errors were encountered: