contao icon indicating copy to clipboard operation
contao copied to clipboard

Remove title attributes in most places

Open ausi opened this issue 1 year ago • 5 comments

Description

According to https://www.a11yproject.com/posts/title-attributes/ title attributes should not be used, except in special circumstances. I agree and think we should remove them (especially on <a>s where we currently set them to the page title).

ausi avatar Aug 20 '24 17:08 ausi

I know that the post might be old (2013) but I do think that this still holds value till today.

Seo-Experts might be just adding it because their SEO-Tools are SHOUTING FOR IT.

Google on title tags (2020)

  • https://www.youtube.com/watch?v=Ak7r3oS1g4Q&t=1208s

    A11Y is a big thing here... From an SEO point of view, I don't think it's something that`s super critical...

W3C on title tags

  • https://www.w3.org/TR/WCAG20-TECHS/H33.html

    The title attribute is used to provide additional information to help clarify or further describe the purpose of a link.

Basically: It may not improve SEO and we should focus more on A11Y - Which will boost SEO

zoglo avatar Aug 20 '24 18:08 zoglo

Related: #6361 #5395

leofeyer avatar Sep 30 '24 12:09 leofeyer

I agree with @zoglo. We shouldn't remove something that could provide value, especially if it means breaking a lot of stuff (tips) for absolutely no benefit. I tested the links with VoiceOver, it does only read the link/image title of a DCA operation once, so there's no problem with duplication (at least in my case):

aschempp avatar Oct 01 '24 14:10 aschempp

We shouldn't remove something that could provide value

It harms the usabililty for people that have a screenreader with title attributes enabled, see https://github.com/contao/contao/issues/6361#issuecomment-1702495691

especially if it means breaking a lot of stuff (tips)

The tooltips have to be adjusted in a pull request that removes the titles.

ausi avatar Oct 01 '24 14:10 ausi

As discussed, we want to

  • remove the title attributes in the nav_default template and the mod_breadcrumb template (front end);
  • remove the title attributes in the link insert tags (front end);
  • remove the title attributes from links with icons because the icon should have the title as alt attributes (back end).

leofeyer avatar Oct 01 '24 18:10 leofeyer