Bug 35237: Give patron card layout form elements unique IDs
This patch ensures the following patron card layout form fields use
unique IDs:
- page side
- guide box
- guide grid
This semantically links the options to their labels so is more
accessible for screen readers and keyboard navigation.
The patch also adds a 'default' option to the original labels so they
can become useful elements on the form rather than just text labels.
Test plan:
1. Head to 'tools' then 'patron card creator'
2. Click on 'Layouts' underneath 'Manage'
3. Click on 'Edit'
4. Confirm it's easy to tell which options are available and chosen for
page side, guide box, and guide grid
5. Click on the text labels for the options i.e. front, back, on, off.
Confirm the relevant radio button is selected
Sponsored-by: Catalyst IT
Signed-off-by: Noah <noah@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit fc9fc133b0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
parent
b39bb06258
commit
3e77aedf69
|
|
@ -80,27 +80,33 @@
|
|||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="page_side">Page side: </label>
|
||||
<label for="page_side_front">Page side: </label>
|
||||
[% IF ( page_side ) %]
|
||||
<input type="radio" name="page_side" id="page_side" value="F" />Front <input type="radio" name="page_side" id="page_side" value="B" checked="checked" />Back
|
||||
<label for="page_side_front">Front: <input type="radio" name="page_side" id="page_side_front" value="F" /></label>
|
||||
<label for="page_side_back">Back: <input type="radio" name="page_side" id="page_side_back" value="B" checked="checked" /></label>
|
||||
[% ELSE %]
|
||||
<input type="radio" name="page_side" id="page_side" value="F" checked="checked" />Front <input type="radio" name="page_side" id="page_side" value="B" />Back
|
||||
<label for="page_side_front">Front: <input type="radio" name="page_side" id="page_side_front" value="F" checked="checked" /></label>
|
||||
<label for="page_side_back">Back: <input type="radio" name="page_side" id="page_side_back" /></label>
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
<label for="guide_box">Guide box:</label>
|
||||
<label for="guide_box_on">Guide box:</label>
|
||||
[% IF ( guide_box ) %]
|
||||
<input type="radio" name="guide_box" id="guide_box" value="1" checked="checked" />On <input type="radio" name="guide_box" id="guide_box" value="0" />Off
|
||||
<label for="guide_box_on">On: <input type="radio" name="guide_box" id="guide_box_on" value="0" /></label>
|
||||
<label for="guide_box_off">Off: <input type="radio" name="guide_box" id="guide_box_off" value="1" checked="checked" /></label>
|
||||
[% ELSE %]
|
||||
<input type="radio" name="guide_box" id="guide_box" value="1" />On <input type="radio" name="guide_box" id="guide_box" value="0" checked="checked" />Off
|
||||
<label for="guide_box_on">On: <input type="radio" name="guide_box" id="guide_box_on" value="0" checked="checked" /></label>
|
||||
<label for="guide_box_off">Off: <input type="radio" name="guide_box" id="guide_box_off" value="1" /></label>
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
<label for="guide_grid">Guide grid:</label>
|
||||
<label for="guide_grid_off">Guide grid:</label>
|
||||
[% IF ( guide_grid ) %]
|
||||
<input type="radio" name="guide_grid" id="guide_grid" value="1" checked="checked" />On <input type="radio" name="guide_grid" id="guide_grid" value="0" />Off
|
||||
<label for="guide_grid_on">On: <input type="radio" name="guide_grid" id="guide_grid_on" value="1" checked="checked" /></label>
|
||||
<label for="guide_grid_off">Off: <input type="radio" name="guide_grid" id="guide_grid_off" value="0" /></label>
|
||||
[% ELSE %]
|
||||
<input type="radio" name="guide_grid" id="guide_grid" value="1" />On <input type="radio" name="guide_grid" id="guide_grid" value="0" checked="checked" />Off
|
||||
<label for="guide_grid_on">On: <input type="radio" name="guide_grid" id="guide_grid_on" value="1" /></label>
|
||||
<label for="guide_grid_off">Off: <input type="radio" name="guide_grid" id="guide_grid_off" value="0" checked="checked" /></label>
|
||||
[% END %]
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
|||
Loading…
Reference in New Issue