mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05: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
|
@ -10,6 +10,7 @@
|
|||
- Fix a crash when having numeric-only values in opengraph frontmatter
|
||||
- Fix unnecessary session creation on healthcheck endpoint
|
||||
- Fix defect metadata being sent for minio uploads
|
||||
- Fix screen readers announcing headings twice
|
||||
|
||||
## <i class="fa fa-tag"></i> 1.9.9 <i class="fa fa-calendar-o"></i> 2023-07-30
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue