Mostly stuff being hidden using CSS display:none; & not using labels for the checkboxes.
This should be a pretty simple fix though as it's probably just a couple lines of code here.
That being said this is a complex UI & I'm glad that work has been done to not make it a completely overwhelming grid of checkboxes. We just need to make it more accessible for everyone.
Here's the output from the WAVE Toolbar.

| Comment | File | Size | Author |
|---|---|---|---|
| #39 | panelizer-n1963124-39.patch | 452 bytes | damienmckenna |
| #24 | panelizer-n1963124-24.patch | 6.83 KB | damienmckenna |
| #5 | ally-panelizer-1963124-5.patch | 637 bytes | mgifford |
| Screen Shot 2013-04-06 at 8.30.19 AM.png | 168.35 KB | mgifford |
Comments
Comment #1
mgiffordtagging
Comment #2
merlinofchaos commentedCan you give an example of checkboxes in tables like this that are done correctly? I'm not actually sure what needs to be done to fix this.
Comment #3
mgiffordIt's not checkboxes, but it's essentially the same issue with select dropdowns here #1963128: Elements ordering group lacks labels
The permissions table checkboxes in Core does this correctly.
The title is either unset or simply not provided so that FAPI can't provide a label (or a title) for the form element.
I was digging into Panelizer to try to find references to this in the code.. It's probably a simple change in both cases. Unfortunately, I couldn't find the references I was looking for.
The hidden elements here are more complicated as there are less examples of this pattern. It's a neat pattern, but one which will have some accessibility challenges with it.
Comment #4
merlinofchaos commentedAhh okay.
This UI is somewhat abstracted so it can support most any entity with a plugin. You'll find it in PanelizerEntityDefault::settings_form which is in plugins/entity
Comment #5
mgiffordI think this catches the checkboxes..
Where all all the invisible checkboxes being controlled? Must be all in a JS file somewhere, but can't see where.
Comment #6
merlinofchaos commentedThey're using Drupal's core #states mechanism which controls their visibility based upon other checkboxes.
This is a good example:
Comment #7
mgiffordWell, that's very interesting... That's something we'll have to figure out in D8. Don' think that's something that would be easy to back-port.
So, as I understand it,
drupal_process_states() only has two states visible/invisible and invisible uses the CSS display:none; so that it's invisible to everyone.
I believe we need access to a 3rd option, as we do in CSS core/modules/system/system.base.css maybe something like:
But that's not something we can address in this issue apparently. Thanks for helping it along though.
EDIT: New issue #1966990: Forms API drupal_process_states() hidden content is not visible to screen readers
Comment #8
mgiffordAlso, my patch in #5 above doesn't fix the problem. Got me closer, but I don't have time to address it just yet.
Comment #9
damienmckennaComment #9.0
damienmckennaadding a note about ui advantages of this process.
Comment #10
damienmckenna@mgifford: Have you had any time to work on this any further?
Comment #11
damienmckennaComment #12
mgiffordNo, sorry Damien. It's slipped in my priorities.
Comment #13
damienmckennaComment #14
micnap commentedFollowed the example for the label on the permissions page of: Column Name: Row Name.
mgifford had already added the label/row name so I provided the column name....which is hard-coded because the column name is also hard-coded in the table header.
This should complete this ticket as it looks like the hidden checkboxes should be taken care of in #1966990: Forms API drupal_process_states() hidden content is not visible to screen readers.
Comment #15
damienmckennaGiven that #1966990: Forms API drupal_process_states() hidden content is not visible to screen readers is for D8 core, and we're not sure it'll be backported, can more improvements go into Panelizer?
Also, I think it'd be better if the string included a placeholder for the label, e.g. 'Panelize: @label', which I believe would work better for translations.
Comment #16
micnap commentedDoh. Let's do this again. Here's another patch.
I'll take a closer look at 1966990 and see what I can do within Panelizer for the hidden checkboxes.
Comment #17
micnap commentedAlright, one step closer. I added a new state called 'show' that toggles the element-invisible class instead of the display:none that 'visible' toggles and changed the affected form elements to use the new 'show' state.
Still to do:
Add labels to the invisible form elements.
Comment #18
micnap commentedCould have sworn I attached the patch....
Comment #19
micnap commentedI've added the labels to the hidden form elements. Needs to be tested on a site that has a bunch of panelizer templates set up to make sure my labels hold out. They should always be labeled: Column name: Entity name, bundle name.
Comment #20
damienmckennaWould it make sense to move the new state into CTools instead?
Also, after applying the patch some of the checkboxes disappear:

Comment #21
micnap commentedThis should fix the missing checkbox issue. Class was getting toggled incorrectly.
Let me know if the state needs to be moved to CTools.
Comment #22
damienmckennaComment #23
damienmckenna@micnap: Could you please open a CTools issue and see how much could be moved over? Thanks.
Comment #24
damienmckennaI've split out the new 'show' state handler into a CTools issue: #2493041: Add 'show' state handler for hiding/showing form fields
This patch contains all of micnap's code, just updated to use the CTools functionality.
Comment #26
damienmckennaSilly testbot, a recurring problem reoccurred: #2490864: Testbot problems - ctools fails to download properly
Comment #27
damienmckennaThis appears to work correctly for a regular page load, i.e. there are no more regressions.
Comment #28
damienmckennaI tested the admin/structure/panelizer page using HTML_CodeSniffer on Safari 8.0.6 on OSX 10.10.3.
Without the patch, WCAG2A:
Without the patch, WCAG2AA:
Without the patch, WCAG2AAA:
With the patch, WCAG2A:
With the patch, WCAG2AA:
With the patch, WCAG2AAA:
This is a tremendous improvement!
FYI all of the WCAG2AAA errors were related to the admin theme - the page title uses a H2 instead of H1, and there's a lack of color contrast on the text links.
The relevant warnings, i.e. ones not related to the admin theme, were:
All of the notices were related to link 'title' values, etc, i.e. very granular details.
Comment #30
damienmckennaComment #31
damienmckennaCommitted! Thank mgifford for getting us started and micnap for great improvements!
Comment #32
damienmckennaFYI I've created another issue to do a general accessibility review of the entire module: #2493099: [meta] Accessibility review of Panelizer
Comment #34
osopolarThis adds states-show.js, but there is no such file, resulting in the warning:
Edit: I found it here: #2493041: Add 'show' state handler for hiding/showing form fields. Not sure when the ctools stuff gets committed, until then there might be a check of file exists?
Comment #35
damienmckennaYeah, this is will mean the next release of Panelizer will require v7.x-1.8 or newer.
Comment #36
damienmckenna(the patch will fail because CTools 1.8 isn't out yet)
Comment #37
rivimeyIt would appear that this patch has been committed to current 3.x-dev branch, which is unfortunate as the corresponding ctools change has not been committed.
http://cgit.drupalcode.org/panelizer/commit/?id=1c39a213eda19ecae24a1b08...
This was discovered because OpenAtrium has just released 2.42 based on panelizer-dev but using latest (i.e. 1.7) ctools :(
Comment #38
damienmckennaYeah, I was hoping that japerry would have committed it by now. I'll ping him to see if he'd mind doing so.
Comment #39
damienmckennaThe show.js file was finally added to CTools 1.9.
Comment #40
damienmckennaCommitted.