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.

Files: 
CommentFileSizeAuthor
#1 facetapi-accessibility-checkbox-labels-1809030-1.patch2.17 KBDavid_Rothstein
PASSED: [[SimpleTest]]: [MySQL] 566 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new2.17 KB
PASSED: [[SimpleTest]]: [MySQL] 566 pass(es).
[ View ]

Here is the patch.

Status:Needs review» Reviewed & tested by the community

This looks good to me. Verified that the patch in #1809030-1: Facet checkbox links don't have labels adds the ID and label appropriately.

Status:Reviewed & tested by the community» Fixed

Committed 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

Status:Fixed» Needs work

Hi, 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".

Status:Needs work» Fixed

Hi 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

Sorry @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.

I 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.

FiNeX,

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

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.