Skip to content

Commit

Permalink
Merge pull request #1257 from maykinmedia/issue/2343-A11y-1.1.1-exter…
Browse files Browse the repository at this point in the history
…nal-link-text

♿ [#2352] Remove faulty aria-label and add external link
  • Loading branch information
alextreme authored Jun 17, 2024
2 parents 61fdb4a + 3c5a94d commit d03d3a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/open_inwoner/utils/ckeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,20 @@ def get_product_rendered_content(product):
icon.attrs.update(
{
"aria-hidden": "true",
"aria-label": _("Opens in new window"),
"class": "material-icons",
}
)
icon.append("open_in_new")

screen_reader_only_text = soup.new_tag("span")
screen_reader_only_text.attrs.update(
{
"class": "sr-only",
}
)
screen_reader_only_text.append(_("Opens external website"))

element.append(icon)
element.append(screen_reader_only_text)

return soup

0 comments on commit d03d3a2

Please sign in to comment.