Bug 39547 - Required fields not conveyed programmatically in patron details in the OPAC
Summary: Required fields not conveyed programmatically in patron details in the OPAC
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Alexander Blanchard
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-03 14:54 UTC by Alexander Blanchard
Modified: 2025-05-15 06:36 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39547: Required Fields Not Conveyed (48.42 KB, patch)
2025-04-07 10:40 UTC, Alexander Blanchard
Details | Diff | Splinter Review
Bug 39547: Required Fields Not Conveyed (48.48 KB, patch)
2025-04-07 21:37 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 39547: Required Fields Not Conveyed (48.55 KB, patch)
2025-05-12 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Blanchard 2025-04-03 14:54:00 UTC
A recent web usability audit has highlighted that when logged in, some of the fields in the 'Your Details' page are identified as required using red text beneath but this is not indicated programmatically. The solution is to add the required tribute to the fields.
Comment 1 Alexander Blanchard 2025-04-07 10:40:28 UTC
Created attachment 180688 [details] [review]
Bug 39547: Required Fields Not Conveyed

An accessibility audit highlighted that the Personal Details form uses required in red
text to indicate when a field is required but this is not also conveyed programmatically
for users with screen readers.
To test:
1) On Koha's staff site, naviagte to Administration
2) Add surname to PatronSelfModificationMandatoryField
3) On the oPac, navigate to Home > Koha > Your Personal Details
4) Notice that under surname there is red text that reads 'required'
5) Right click and inspect the Surname input
6) Notice that the input field does not have a required attribute
7) Apply the patch
8) Repeat the steps above
9) Notice that on inspect, the required attribute is now present
10) Navigate back to the staff site and to Administration
11) Remove Surname from PatronSelfModificationMandatoryField
12) Navigate back to the oPac Home > Koha > Your Personal Details and refresh
13) Inspect the Surname element and notice that the required attribute is gone
14) The same behaviour should be present for all form elements
Comment 2 Brendan Gallagher 2025-04-07 21:37:11 UTC
Created attachment 180710 [details] [review]
Bug 39547: Required Fields Not Conveyed

An accessibility audit highlighted that the Personal Details form uses required in red
text to indicate when a field is required but this is not also conveyed programmatically
for users with screen readers.
To test:
1) On Koha's staff site, naviagte to Administration
2) Add surname to PatronSelfModificationMandatoryField
3) On the oPac, navigate to Home > Koha > Your Personal Details
4) Notice that under surname there is red text that reads 'required'
5) Right click and inspect the Surname input
6) Notice that the input field does not have a required attribute
7) Apply the patch
8) Repeat the steps above
9) Notice that on inspect, the required attribute is now present
10) Navigate back to the staff site and to Administration
11) Remove Surname from PatronSelfModificationMandatoryField
12) Navigate back to the oPac Home > Koha > Your Personal Details and refresh
13) Inspect the Surname element and notice that the required attribute is gone
14) The same behaviour should be present for all form elements

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 3 Martin Renvoize (ashimema) 2025-05-12 11:30:57 UTC
Created attachment 182259 [details] [review]
Bug 39547: Required Fields Not Conveyed

An accessibility audit highlighted that the Personal Details form uses required in red
text to indicate when a field is required but this is not also conveyed programmatically
for users with screen readers.
To test:
1) On Koha's staff site, naviagte to Administration
2) Add surname to PatronSelfModificationMandatoryField
3) On the oPac, navigate to Home > Koha > Your Personal Details
4) Notice that under surname there is red text that reads 'required'
5) Right click and inspect the Surname input
6) Notice that the input field does not have a required attribute
7) Apply the patch
8) Repeat the steps above
9) Notice that on inspect, the required attribute is now present
10) Navigate back to the staff site and to Administration
11) Remove Surname from PatronSelfModificationMandatoryField
12) Navigate back to the oPac Home > Koha > Your Personal Details and refresh
13) Inspect the Surname element and notice that the required attribute is gone
14) The same behaviour should be present for all form elements

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Martin Renvoize (ashimema) 2025-05-12 11:33:19 UTC
Passing QA, this is a small but important accessibility improvement which causes no regressions for general users.
Comment 5 Katrin Fischer 2025-05-15 06:36:02 UTC
Pushed for 25.05!

Well done everyone, thank you!