mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
fix(a11y): hide duplicated link text from screen readers
Because screen readers don't know that the anchor icon is not meant to be read, they might read the title (which is the same as the heading itself) in addition to the heading, thus causing a duplicated output. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
858d7bf5d1
commit
bf740ad910
2 changed files with 2 additions and 0 deletions
|
@ -845,6 +845,7 @@ function imgPlayiframe (element, src) {
|
|||
|
||||
const anchorForId = id => {
|
||||
const anchor = document.createElement('a')
|
||||
anchor.ariaHidden = 'true'
|
||||
anchor.className = 'anchor hidden-xs'
|
||||
anchor.href = `#${id}`
|
||||
anchor.innerHTML = '<i class="fa fa-link"></i>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue