localgovdrupal / localgov_step_by_step

Implemention of the Gov.uk Step by step navigation journeys for LocalGovDrupal
GNU General Public License v2.0
1 stars 1 forks source link

Step summaries #15

Closed danchamp closed 4 years ago

danchamp commented 4 years ago

The accessibility of the show/hide mechanism for step summaries can be improved.

Using an anchor element with a null (#) href to hide and show step summaries has these implications:

Using button elements will provide the same functionality as anchors, without these accessibility issues.

CSS will present the buttons as links, as per GOV.UK pattern

Buttons will display the same visible text as present - 'Show summaries', 'Hide summaries', 'Show step summary', 'Hide step summary' - but will make use of aria-labelled-by attributes to qualify the actions to the relevant step summary or 'all summaries'.

The state of each step summary should be communicated with the aria-expanded attribute.

danchamp commented 4 years ago

On a closer look, aria-labelled-by doesn't make sense, since it will just assign the step title to the button.

An aria-label attribute for each button will be generated instead, with the format '[Show|Hide] {step__title} summary'

danchamp commented 4 years ago

The behaviour of the show/hide all summaries links currently differs from the GDS pattern, and is buggy:

Examples:

On gov.uk (example):

I propose to align the behaviour with the gov.uk pattern, unless there are any contrary views? @willguv @cjstevens78 @andybroomfield

andybroomfield commented 4 years ago

Step by step not widly used at BHCC right now, I would generally prefer to follow the GDS pattern where possible.