The facet checkboxes this module adds via JavaScript when the checkbox links widget is being used do not have labels.
Although there is a link right next to the checkbox that should help with accessibility quite a bit, Section 508 guidelines require the checkbox to have an actual label and apparently don't have much room to budge on that.
So, I wrote a patch to do this. The label is invisible (only shown to screen reader users) since it duplicates information already found in the link itself.
A better way to do this might be to have the JavaScript transform the link into a label directly (similar to what is proposed in #1526020-10: When a facet is active, facet text should also be a link (or at least themeable, at best, configurable)). Then there would be no duplication. I didn't do this because by changing the HTML that way it would mess up some theming (in particular on the site I need this for, but also in general given that Facet API has a stable release).
In any case, this patch ought to be a good start regardless of which method is eventually chosen.
Comment | File | Size | Author |
---|---|---|---|
#1 | facetapi-accessibility-checkbox-labels-1809030-1.patch | 2.17 KB | David_Rothstein |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedHere is the patch.
Comment #2
cpliakas CreditAttribution: cpliakas commentedThis looks good to me. Verified that the patch in #1809030-1: Facet checkbox links don't have labels adds the ID and label appropriately.
Comment #3
cpliakas CreditAttribution: cpliakas commentedCommitted to 7.x versions of Facet API.
6.x-3.x will need a backport. #1816052: Backport: Facet checkbox links don't have labels.
Thanks for the contribution,
Chris
Comment #4
FiNeX CreditAttribution: FiNeX commentedHi, I've downloaded the latest -dev version (I've checked the source code, it contains the patch), but the problem is not solved: the label is still hidden after clicking on a checkbox.
The HTML contains the link, but it has "display:none".
Comment #5
cpliakas CreditAttribution: cpliakas commentedHi FiNeX.
Thanks for the post. Re-closing as fixed, because the purpose of this patch is for accessibility and not display. That is why the display:none is in place. If you are looking to modify the display of the facets by prefixing with a label, then that is a separate issue we can talk though in a new support request to help meet your need.
Thanks,
Chris
Comment #6
FiNeX CreditAttribution: FiNeX commentedSorry @cpliakas, I didn't understood the purpose of the topic, I've confused the "label" term :-) Thanks for the feedback, I will open a separate report.
Comment #7
David_Rothstein CreditAttribution: David_Rothstein commentedI think #1526020: When a facet is active, facet text should also be a link (or at least themeable, at best, configurable) (linked to previously) is at least partially related to that as well.
Comment #8
cpliakas CreditAttribution: cpliakas commentedFiNeX,
Not a problem at all! As David_Rothstein mentioned, let's continue the discussions / patches for the topic you brought up in that thread.
Thanks all,
Chris