Bug 24703 - Show accesskeys with CSS instead of hardcoding them in the button text
Summary: Show accesskeys with CSS instead of hardcoding them in the button text
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-21 11:18 UTC by paxed
Modified: 2020-02-21 11:18 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2020-02-21 11:18:04 UTC
Currently the accesskeys are hardcoded into the button texts, like so:

<button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>

This is a problem eg. when translating the texts.

A more elegant solution would be to use CSS to show the actual access key value, such as

button[accesskey]:after {
 margin-left: 0.5em;
 content: "(" attr(accesskey) ")";
}