Opened 2 weeks ago
Closed 2 weeks ago
#62122 closed defect (bug) (invalid)
tabindex attribute with the filter widget.
Reported by: | jannevdwerf | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 6.6.2 |
Component: | Script Loader | Keywords: | |
Focuses: | Cc: |
Description
So I am working on a project, Next Generation Internet and we value accessibility very much. So much that we found a small problem in our site. https://ngi.aimsites.nl/resources/.
When tabbing in the filter sidebar, we select the checkbox and label. Which both link to the same website, bus are seen as 2 of different inputs. Now I wanted to hardcode a tabindex="-1" inside those <a> with a simple script:
var filterBar = document.getElementById('secondary'); var links = filterBar.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) { links[i].setAttribute('tabindex', '-1'); }
But that doesn't seem to fix the problem because you have such a good programmed plugin. So now I have the question if you could fix that problem. Maybe have an option for it to disable something like that?
Nevertheless, thank you for such a great plugin.
if (wpa.tabindex) { var q = t("input,a,select,textarea,button").not("a:not([href])") , A = 0; q.each(function() { var i = t(this).attr("tabindex"); i && (t(this).removeAttr("tabindex"), A++) }), A > 0 && (wpa.errors || wpa.tracking) && (a.push(["control-tabindex", A]), console.log(A + " tabindex attributes removed from links, buttons and inputs by WP Accessibility")); var k = t('div[role="button"]').not("div[tabindex]") , _ = t('a[role="button"]').not("a[tabindex],a[href]"); k.attr("tabindex", "0").addClass("wpa-focusable"), k.length > 0 && (wpa.errors || wpa.tracking) && (a.push(["button-add-tabindex", k.length]), console.log(k.length + " tabindex attributes added to divs with the button role by WP Accessibility")), _.attr("tabindex", "0").addClass("wpa-focusable"), _.length > 0 && (wpa.errors || wpa.tracking) && (a.push(["link-add-tabindex", _.length]), console.log(_.length + " tabindex attributes added to anchor elements with the button role and no href value by WP Accessibility")) }
Inside file: wp-accessibility.min.js?ver=2.1.7
Hi, @jannevdwerf! This is a plugin issue, and should be opened in the plugin's support forum.
Ironically, I'll also be the person to answer your question there, but this environment is for handling issues with WordPress itself; plugin issues should be handled in the support forums.