Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 Today 09:03:13

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,662
Website

Re: Overriding the thumbnail size for SVG images in admin side list

Bloke wrote #342722:

Noted. In general then, are we saying that the html title attribute is rather useless and we should phase it out admin-side? Or does it occasionally have its place?

At the risk of sounding overly harsh, removing them is the best option :-). In the whole Textpattern admin UI, there are very very few instances where it could be useful. What does the title="edit" mean? (e.g on link wrapping the thumb under discussion here).

One could argue on a label-less form input field, as a replacement for the missing label, but then it need to be more verbose (See Preferences, Site > date format fields.). But then using aria-label would be better for that use case.

Read:


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#17 Today 09:11:49

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,662
Website

Re: Overriding the thumbnail size for SVG images in admin side list

BTW. in Pete’s case, he could author his alt attribute text for those icons, adding at the start or end [icon] or some such.

Then:

td.has-thumbnail img[alt^="[icon]"] {
  width: 2em;
  height: 2em;
}

(But I go with embedded SVG as suggested by Jakob, or a CSS background image).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#18 Today 10:28:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,484
Website GitHub

Re: Overriding the thumbnail size for SVG images in admin side list

phiw13 wrote #342723:

At the risk of sounding overly harsh, removing [title attributes] is the best option :-)

Thanks for the links and insight. Works for me. Let’s axe them from the admin UI as we go.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#19 Today 12:23:58

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,566
Website GitHub Mastodon

Re: Overriding the thumbnail size for SVG images in admin side list

If you are going to remove title attributes then you’ll definitely need to add aria-label instead where appropriate. for example…

<a title="Edit" href="?event=image&amp;step=image_edit&amp;id=1&amp;sort=id&amp;dir=asc&amp;page=1&amp;search_method=category">1.jpg</a>

…definitely needs some explanation to assistive devices, such as…

<a aria-label="Edit 1.jpg" href="?event=image&amp;step=image_edit&amp;id=1&amp;sort=id&amp;dir=asc&amp;page=1&amp;search_method=category">1.jpg</a>

…otherwise the screen reader which just read out the href contents with no further context.

Offline

#20 Today 12:59:01

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,662
Website

Re: Overriding the thumbnail size for SVG images in admin side list

philwareham wrote #342733:

If you are going to remove title attributes then you’ll definitely need to add aria-label instead where appropriate. for example…

<a title="Edit" href="?event=image&amp;step=image_edit&amp;id=1&amp;sort=id&amp;dir=asc&amp;page=1&amp;search_method=category">1.jpg</a>...

…definitely needs some explanation to assistive devices, such as…

<a aria-label="Edit 1.jpg" href="?event=image&amp;step=image_edit&amp;id=1&amp;sort=id&amp;dir=asc&amp;page=1&amp;search_method=category">1.jpg</a>...

…otherwise the screen reader which just read out the href contents with no further context.

One could then argue that this is a better (even smoother?) listening experience. And more broadly available as AT users won’t turn off the broadcasting of aria-** attributes.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB