This panel style ends up generating a grid of pane titles and content, using the table rows and columns to provide the grid layout. Because it's a layout table, it's not set up for use by assistive technologies that provide specific navigation commands for tables.
The ARIA role of "presentation" will tell assistive technologies such as screenreaders to ignore their specific table handling and just read the table in source code order as text content.
It would be good to add an option to the pane settings that would this role to the table when it's rendered.
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff.txt | 743 bytes | dsnopek |
#4 | panels_style_table-role-presentation-2831571-4.patch | 1.73 KB | dsnopek |
Comments
Comment #2
cboyden CreditAttribution: cboyden commentedPatch is attached.
Comment #3
mgiffordMakes sense to me.
Comment #4
dsnopekThe patch works, but doesn't include a default value for this new bit of configuration, which causes a PHP notice when rendering regions that were previously configured. I've added a new patch that defaults to TRUE, but I don't really know the accessibility implications of that. Is there a case where that would cause problems? Would defaulting to FALSE be better?
Also, would it help to also use
<th>
tags instead of<td>
for pane titles? I think that would be more semantically correct, but I'm not sure how it would affect accessibility. If it'd be a positive or at least neutral change, then I think we should do that too (we can just set'header' => TRUE
on the cells).Comment #5
cboyden CreditAttribution: cboyden commentedPane title cells as THs makes sense in general, but there may be a problem if the table is configured with multiple sets of columns instead of a single set (one title, one value). We'd have to look at what happens if there are two TH tags scoped to the same row. I don't think you want to go down the road of adding explicit
headers
references to each value cell pointing to its title cell, though it would be programmatically possible.Also if the role of presentation is added, I believe the semantics of the TH will be ignored and still read as text.
Comment #6
cboyden CreditAttribution: cboyden commentedMy inclination would be to have the configuration default to TRUE, but in the interest of not changing existing code, perhaps it could be TRUE for new instances and FALSE for existing instances? Or would that be confusing? Would there need to be an update hook either way?
Comment #7
dsnopekEep! I hadn't considered that. Implementing the explicit
headers
references actually wouldn't be that hard. I guess the question is if that does the right thing by screenreaders. I think that warrants making it its own issue:#2842286: Pane titles should be in TH (rather than TR) tags
Defaulting to TRUE or FALSE in all cases doesn't require an update hook. However, having one default for new instances and another for old instances does. I'd prefer to pick just one default and I'm fine with defaulting to TRUE if you see no serious accessibility issues with that choice.
Comment #9
dsnopekCommitted!