Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 Today 09:03:13
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
titleattribute 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:
- www.tpgi.com/using-the-html-title-attribute-updated/
- spec, note the “Note”
- MDN
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Online
#17 Today 09:11:49
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
Online
#18 Today 10:28:39
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
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. or example…
<a title="Edit" href="?event=image&step=image_edit&id=1&sort=id&dir=asc&page=1&search_method=category">1.jpg</a>
…definitely needs some explanation to assistive devices, such as…
<a aria-label="Edit 1.jpg" href="?event=image&step=image_edit&id=1&sort=id&dir=asc&page=1&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
Re: Overriding the thumbnail size for SVG images in admin side list
philwareham wrote #342733:
If you are going to remove
titleattributes then you’ll definitely need to addaria-labelinstead where appropriate. or example…
<a title="Edit" href="?event=image&step=image_edit&id=1&sort=id&dir=asc&page=1&search_method=category">1.jpg</a>...…definitely needs some explanation to assistive devices, such as…
<a aria-label="Edit 1.jpg" href="?event=image&step=image_edit&id=1&sort=id&dir=asc&page=1&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
Online