Bug 41177 - Breadcrumbs should have aria-disabled attribute if its the current page
Summary: Breadcrumbs should have aria-disabled attribute if its the current page
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Jake Deery
QA Contact: Lisette Scheer
URL:
Keywords: release-notes-needed
Depends on:
Blocks: 41368
  Show dependency treegraph
 
Reported: 2025-11-04 15:41 UTC by Jake Deery
Modified: 2025-12-04 13:27 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.06
Circulation function:


Attachments
Bug 41177: Add aria-disabled to breadcrumbs (12.91 KB, patch)
2025-11-04 15:48 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 41177: Add aria-disabled to breadcrumbs (12.95 KB, patch)
2025-11-06 16:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41177: (follow-up) A few minor corrections (9.87 KB, patch)
2025-11-06 16:42 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41177: (follow-up) A few minor corrections (9.94 KB, patch)
2025-11-07 09:27 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 41177: (follow-up) A few minor corrections (9.94 KB, patch)
2025-11-07 09:29 UTC, Jake Deery
Details | Diff | Splinter Review
Bug 41177: (follow-up) A few minor corrections (9.99 KB, patch)
2025-11-18 01:29 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 41177: Add aria-disabled to breadcrumbs (13.01 KB, patch)
2025-11-18 01:31 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 41177: (follow-up) A few minor corrections (9.99 KB, patch)
2025-11-18 01:31 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 41177: Adjust Cypress tests (1.29 KB, patch)
2025-11-25 16:09 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41177: Adjust Cypress tests (1.35 KB, patch)
2025-11-25 16:22 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Deery 2025-11-04 15:41:41 UTC
We should use the aria-disabled attribute correctly on the breadcrumbs menu. This aids in accessibility, as it signifies to screen readers whether or not a link should be clickable
Comment 1 Jake Deery 2025-11-04 15:48:32 UTC
Created attachment 189033 [details] [review]
Bug 41177: Add aria-disabled to breadcrumbs

This patch adds aria-disabled and tabindex = -1 to a breadcrumb, if it
is the current page. This aids in accesssibility, and is generally good
practice.

== TO TEST: ==
a)  Visit any page on the OPAC, and inspect the breadcrumb pertinent to
the current page
    *)  Notice the lack of aria-disabled and tabindex on the inspected
    element
== APPLY PATCH ==
b)  repeat step a
    *)  Notice how there is now an aria-disabled and tabindex = -1
    *)  Notice you cannot tab on to the final breadcrumb anymore
c)  Ensure other breadcrumbs are unaffected and still work as links
== SIGN OFF ==
Comment 2 Owen Leonard 2025-11-06 16:42:40 UTC
Created attachment 189188 [details] [review]
Bug 41177: Add aria-disabled to breadcrumbs

This patch adds aria-disabled and tabindex = -1 to a breadcrumb, if it
is the current page. This aids in accesssibility, and is generally good
practice.

== TO TEST: ==
a)  Visit any page on the OPAC, and inspect the breadcrumb pertinent to
the current page
    *)  Notice the lack of aria-disabled and tabindex on the inspected
    element
== APPLY PATCH ==
b)  repeat step a
    *)  Notice how there is now an aria-disabled and tabindex = -1
    *)  Notice you cannot tab on to the final breadcrumb anymore
c)  Ensure other breadcrumbs are unaffected and still work as links
== SIGN OFF ==

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2025-11-06 16:42:42 UTC
Created attachment 189189 [details] [review]
Bug 41177: (follow-up) A few minor corrections

This patch makes the following corrections:

 - Remove link from breadcrumb WRAPPER items. The right markup is
   generated in html_helpers.inc if you add the "bc_active = 1" to the
   breadcrumb_item WRAPPER.
 - Remove "href='#'" from inactive links, and adjust CSS accordingly.
   The W3C validator doesn't like it when a true "aria-disabled"
   attribute is on a link which has an href attribute.
Comment 4 Owen Leonard 2025-11-06 16:43:38 UTC
Jake I hope my follow-up makes sense!
Comment 5 Jake Deery 2025-11-07 09:27:40 UTC Comment hidden (obsolete)
Comment 6 Jake Deery 2025-11-07 09:29:51 UTC
Created attachment 189262 [details] [review]
Bug 41177: (follow-up) A few minor corrections

This patch makes the following corrections:

 - Remove link from breadcrumb WRAPPER items. The right markup is
   generated in html_helpers.inc if you add the "bc_active = 1" to the
   breadcrumb_item WRAPPER.
 - Remove "href='#'" from inactive links, and adjust CSS accordingly.
   The W3C validator doesn't like it when a true "aria-disabled"
   attribute is on a link which has an href attribute.

Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Comment 7 Jake Deery 2025-11-07 09:30:45 UTC
Thanks for that, Owen. Looks good to me, signed off!
Comment 8 Lisette Scheer 2025-11-18 01:29:44 UTC
Created attachment 189651 [details] [review]
Bug 41177: (follow-up) A few minor corrections

This patch makes the following corrections:

 - Remove link from breadcrumb WRAPPER items. The right markup is
   generated in html_helpers.inc if you add the "bc_active = 1" to the
   breadcrumb_item WRAPPER.
 - Remove "href='#'" from inactive links, and adjust CSS accordingly.
   The W3C validator doesn't like it when a true "aria-disabled"
   attribute is on a link which has an href attribute.

Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 9 Lisette Scheer 2025-11-18 01:31:39 UTC
Created attachment 189652 [details] [review]
Bug 41177: Add aria-disabled to breadcrumbs

This patch adds aria-disabled and tabindex = -1 to a breadcrumb, if it
is the current page. This aids in accesssibility, and is generally good
practice.

== TO TEST: ==
a)  Visit any page on the OPAC, and inspect the breadcrumb pertinent to
the current page
    *)  Notice the lack of aria-disabled and tabindex on the inspected
    element
== APPLY PATCH ==
b)  repeat step a
    *)  Notice how there is now an aria-disabled and tabindex = -1
    *)  Notice you cannot tab on to the final breadcrumb anymore
c)  Ensure other breadcrumbs are unaffected and still work as links
== SIGN OFF ==

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 10 Lisette Scheer 2025-11-18 01:31:43 UTC
Created attachment 189653 [details] [review]
Bug 41177: (follow-up) A few minor corrections

This patch makes the following corrections:

 - Remove link from breadcrumb WRAPPER items. The right markup is
   generated in html_helpers.inc if you add the "bc_active = 1" to the
   breadcrumb_item WRAPPER.
 - Remove "href='#'" from inactive links, and adjust CSS accordingly.
   The W3C validator doesn't like it when a true "aria-disabled"
   attribute is on a link which has an href attribute.

Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 11 Lucas Gass (lukeg) 2025-11-18 14:00:40 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 12 Paul Derscheid 2025-11-25 13:43:09 UTC
Hi there, I think the second commit breaks Tools/ManageMarcImport_spec.ts, see Koha_Main, run #3445 for reference.

Probably just some markup that shifted around.
Comment 13 Owen Leonard 2025-11-25 15:12:04 UTC
I don't know Cypress but is this the problematic line?

cy.contains("Manage staged MARC records").click();

Is the "click" not being registered because there is not longer an href attribute?
Comment 14 Paul Derscheid 2025-11-25 15:15:58 UTC
I think the exact error was something like that, yeah. CSS evaluating to `pointer-events: none`.
Comment 15 Lucas Gass (lukeg) 2025-11-25 16:09:37 UTC
Created attachment 189931 [details] [review]
Bug 41177: Adjust Cypress tests
Comment 16 Paul Derscheid 2025-11-25 16:22:34 UTC
Created attachment 189932 [details] [review]
Bug 41177: Adjust Cypress tests

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 17 Lucas Gass (lukeg) 2025-11-25 17:14:12 UTC
follow-up pushed to main
Comment 18 Paul Derscheid 2025-12-01 14:55:55 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 19 Fridolin Somers 2025-12-04 13:27:05 UTC
Hard to apply on 24.11.x LTS I skip