Bug 34647 - name attribute is obsolete in anchor tag
Summary: name attribute is obsolete in anchor tag
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Matt Blenkinsop
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 35894
Blocks: 36359
  Show dependency treegraph
 
Reported: 2023-08-29 18:31 UTC by Fridolin Somers
Modified: 2024-03-19 16:09 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.03,23.05.09


Attachments
Bug 34647: Replace name attributes with ids (6.30 KB, patch)
2024-01-24 15:14 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34647: Delete unnecessary anchor tag (1.76 KB, patch)
2024-01-24 15:14 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34647: Replace name attributes with ids (6.32 KB, patch)
2024-01-24 17:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34647: Delete unnecessary anchor tag (1.79 KB, patch)
2024-01-24 17:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35894: (follow-up) Minor fixes (2.07 KB, patch)
2024-01-24 17:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34647: (follow-up) Minor fixes (2.07 KB, patch)
2024-01-25 14:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34647: (follow-up) Minor fixes (2.15 KB, patch)
2024-01-25 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34647: Replace name attributes with ids (6.40 KB, patch)
2024-01-25 15:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34647: Delete unnecessary anchor tag (1.86 KB, patch)
2024-01-25 15:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34647: (follow-up) Minor fixes (2.20 KB, patch)
2024-01-25 15:38 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2023-08-29 18:31:09 UTC
Looks like since HTML5, attribute "name" on tag <a> is obsolete :
https://html.spec.whatwg.org/multipage/obsolete.html#obsolete-but-conforming-features

We have a few of them :
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt:                        <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]">
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt:                        <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]"></a>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt:                                                        <a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt:                                <h3><a name="summary" id="summary"></a>Summary</h3>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt:                        <a name="modaction"></a>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt:                                <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]">[% koha_new.title | html %]</a>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt:                                                    [% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]

How should we replace ?
Some may be not uniq so can't be an id.

Maybe an accessibility issue.
Comment 1 David Cook 2023-08-30 00:46:33 UTC
(In reply to Fridolin Somers from comment #0)
> How should we replace ?
> Some may be not uniq so can't be an id.
 
I'd say a class.
Comment 2 Fridolin Somers 2023-08-31 01:05:59 UTC
But currently this allows to have an anchor on it.
For example opac-main.pl#newsitem1
A class will break this.

Maybe in this case use an id.
Comment 3 David Cook 2023-08-31 01:20:14 UTC
(In reply to Fridolin Somers from comment #2)
> But currently this allows to have an anchor on it.
> For example opac-main.pl#newsitem1
> A class will break this.
> 
> Maybe in this case use an id.

Ah yes. That would be an issue for that particular case.

You could cheat with Javascript as well but yeah maybe an ID...
Comment 4 Matt Blenkinsop 2024-01-24 15:14:55 UTC Comment hidden (obsolete)
Comment 5 Matt Blenkinsop 2024-01-24 15:14:57 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2024-01-24 17:05:59 UTC
Created attachment 161354 [details] [review]
Bug 34647: Replace name attributes with ids

This patch replaces name attributes on <a> tags as this is now obsolete
in HTML 5. The recommended practice is to substitute these for ids, as
has been done in this patch

Test plan:
1) Navigate to each page where the link has been amended
2) Check that the link still works as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Owen Leonard 2024-01-24 17:07:23 UTC
Created attachment 161355 [details] [review]
Bug 34647: Delete unnecessary anchor tag

This patch removes an anchor tag from the form that does not seem to
serve any purpose. The form has an id attribute and it is this that
appears to be used for navigation to and displaying the form.

Test plan:
1) Navigate to Cataloging > marc modification templates
2) Add a new template or edit an existing one
3) The form to add a new action should be displayed when either the
   "New action" button is clicked or you select to edit an existing
   action

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Owen Leonard 2024-01-24 17:12:01 UTC Comment hidden (obsolete)
Comment 9 Matt Blenkinsop 2024-01-25 14:39:29 UTC
The bug number is wrong on the follow-up patch, should that patch be on bug 35894 or does it need re-numbering?
Comment 10 Owen Leonard 2024-01-25 14:43:56 UTC
Created attachment 161422 [details] [review]
Bug 34647: (follow-up) Minor fixes

This patch fixes the functionality of the <select> menu for jumping to a
particular vendor, "Choose a vendor in the list to jump directly to the
right place."

The patch also removes the empty anchor tag on the "Items with no
checkouts" report. It appears to be unused.
Comment 11 Owen Leonard 2024-01-25 14:44:26 UTC
(In reply to Matt Blenkinsop from comment #9)
> The bug number is wrong on the follow-up patch

Sorry about that!
Comment 12 Matt Blenkinsop 2024-01-25 14:52:39 UTC
Created attachment 161425 [details] [review]
Bug 34647: (follow-up) Minor fixes

This patch fixes the functionality of the <select> menu for jumping to a
particular vendor, "Choose a vendor in the list to jump directly to the
right place."

The patch also removes the empty anchor tag on the "Items with no
checkouts" report. It appears to be unused.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 13 Martin Renvoize 2024-01-25 15:38:46 UTC
Created attachment 161432 [details] [review]
Bug 34647: Replace name attributes with ids

This patch replaces name attributes on <a> tags as this is now obsolete
in HTML 5. The recommended practice is to substitute these for ids, as
has been done in this patch

Test plan:
1) Navigate to each page where the link has been amended
2) Check that the link still works as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2024-01-25 15:38:49 UTC
Created attachment 161433 [details] [review]
Bug 34647: Delete unnecessary anchor tag

This patch removes an anchor tag from the form that does not seem to
serve any purpose. The form has an id attribute and it is this that
appears to be used for navigation to and displaying the form.

Test plan:
1) Navigate to Cataloging > marc modification templates
2) Add a new template or edit an existing one
3) The form to add a new action should be displayed when either the
   "New action" button is clicked or you select to edit an existing
   action

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2024-01-25 15:38:52 UTC
Created attachment 161434 [details] [review]
Bug 34647: (follow-up) Minor fixes

This patch fixes the functionality of the <select> menu for jumping to a
particular vendor, "Choose a vendor in the list to jump directly to the
right place."

The patch also removes the empty anchor tag on the "Items with no
checkouts" report. It appears to be unused.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2024-01-25 15:39:10 UTC
Great to see these going through, thanks Matt.

Passing QA
Comment 17 Katrin Fischer 2024-01-26 14:17:26 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 18 Fridolin Somers 2024-01-31 13:08:50 UTC
Pushed to 23.11.x for 23.11.03
Comment 19 Lucas Gass 2024-02-08 20:21:59 UTC
Backported to 23.05.x for upcoming 23.05.09