Questions tagged [alt-attribute]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

Language of parts for image alt text

I was working on the DHS trusted tester course and came across this example (on Lesson 4: Forms (On Input) > Passing examples > Example 3) where a page language is changed to Spanish using a ...
TomC's user avatar
  • 11
0 votes
0 answers
28 views

Owl-carousel missing alt attributes

Does anyone know how to get the alt attribute tag in the code on the owl carousel? The alt text appears in the media files, but don't appear in the code and Google is saying they're missing which isn'...
SEI's user avatar
  • 1
1 vote
0 answers
32 views

How to add Alt Tag to Images loaded via OpenLayer

I need to automatically add Alt tag to images generated automatically via Openlayer. I tried different solutions via Jquery and js, but none seems to work How to add an alt attribute of img tags with ...
luca_papi's user avatar
0 votes
0 answers
35 views

leaflet map design image alt title is required?

I load a Leaflet JS based map at launch of my website. I have no problems with creating, displaying maps and other operations, it opens very fast 92% average speed result But in the google pagespeed ...
Kadir Çolak's user avatar
0 votes
0 answers
50 views

AHK wont send ALT+key

I wrote a simple AHK script to remap keyboard keys for classic DOOM. The native keybindings uses the up and down arrow to move forward and back, left and right to rotate left and right, and then alt+...
echocosm's user avatar
0 votes
3 answers
53 views

How do I get ALT attributes for a onClick link?

Consider: <a href="#" onClick="myFunction22()"><img src="images/icon-exit.png" width="34" height="34" alt="Exit Fullscreen"></...
timbukto's user avatar
0 votes
0 answers
59 views

how can i map <Alt> itself on vim/nvim to <Esc>

I want to map (from the init.vim file) the key to the key ON VIM/NVIM because its closer to my thumb. The only thing I found online was binding <Alt + key>, not itself. Is this even possible? ...
midi's user avatar
  • 11
0 votes
3 answers
147 views

How to add alt text to images without an ID

I need to add alt text to various images which do not have IDs or anything else to identify the images from one another other there the image file names. Is there a way to add alt text to each image ...
Mickey's user avatar
  • 13
-1 votes
1 answer
235 views

Can you add alt/aria-label directly into CSS?

We are currently in the process of completing some accessibility checks on our website. One of the issues it has identified is that the 2 icons on our mobile version need "discernible text": ...
Samantha Ashton's user avatar
0 votes
0 answers
33 views

why php code is not working inside the img tag?

<img class="image" src="./uploads/<?php echo $row['image_url']; ?>" width="300px" height="280px" alt="Movie poster"> in this img tag the ...
Tasnim's user avatar
  • 1
0 votes
1 answer
123 views

Generate alt texts for upload images with AI in TYPO3?

I am searching for a way to automatically generate alt texts for images when uploading them in the TYPO3 backend? Is there any extension that can do this, or similar extensions for generating alt ...
jmautner's user avatar
0 votes
0 answers
15 views

Get Image alt from cmb2 filed in loop cmb2

<?php $meta = get_post_meta($postid, '_urunler_gallery1',true); $image_id = get_post_thumbnail_id(); $image_alt = get_post_meta($image_id, '_wp_attachment_image_alt', TRUE); $image_title = ...
fahrettin alphan özel's user avatar
0 votes
1 answer
290 views

How can I implement alternative text on an element with a background image?

AIOSEO site health states this image has no alt text tag. How do I fix it and save the change so it solves the issue? Thanks <div class="_9VmET" style="background-image: url(&...
Mark D Vincent's user avatar
0 votes
0 answers
125 views

How to get Firefox to show broken image icon with alt text?

When an image fails to load on a page, the behaviour of Firefox seems to be to show its alt text if that attribute exists, otherwise it shows the broken image icon. This isn't ideal as the alt text ...
o c's user avatar
  • 89
1 vote
0 answers
35 views

How to add attribute 'alt' to react core UI CAvatar component?

Ho to add alt attribute for the React coreUI CAvatar img? We have the below code to display the image as an avatar in our application, but while doing the web accessibility test we get a Missing ...
Nambi Rajan.P's user avatar
0 votes
0 answers
274 views

Add "alt" tag to images wordpress

I'm trying to solve a situation by creating a code that checks and automatically adds alt tag from the name. It works partially, that is, it does what it has to do, but whatever I do, I end up ...
Luk's user avatar
  • 23
-2 votes
1 answer
186 views

What's the use of 'alt' attribute in the image tag of HTML5?

If the code in HTML5 is: (*** stands for whatever information we need to fill, it is just for example not a keyword) <img src = "***.jpg" width = "***" height = "**" ...
Priyanshi Sreshth's user avatar
-1 votes
1 answer
325 views

Trying to add ALT tag within popup lightbox Lightbox2 for ADA Compliance Standards

I am updating a client's site to include alt tags to bring their site to ADA compliance. I have a few pages that use Lightbox2 from https://lokeshdhakar.com/projects/lightbox2. I added the ALT ...
WindowsWarrior's user avatar
4 votes
2 answers
2k views

Is there an 'alt' attribute for the <picture> tag? — Use case: picture element without <img src="">

I am using <picture> tags. My target group uses modern browsers, so as soon as Firefox supports WebP there is no need to use the <img> tag. Now: <picture> <source srcset="...
dash's user avatar
  • 1,269
0 votes
1 answer
85 views

Adding Alt Tags To Carousel

I am trying to add alt tags to a custom boat carousel and boat page on my website. Not sure what PHP I need to add and where to put it. The images on both the carousel and the page are thumbnails. I ...
5 Star Cruises's user avatar
0 votes
2 answers
105 views

What valid alt attribute should be for each image in a slideshow?

In a website directory, every business has a slideshow with several images. If I don't know what kind of picture is in each case, what should be the best way to handle the alt attribute for each image/...
VictorC's user avatar
  • 326
0 votes
0 answers
92 views

Img alt attribute localization failed on asp.net

I want to localize the img alt attribute on an asp.net project so it could be multilingual. I want it preferably to be in LocalResources and not Global. Also i want to know if this can happen without ...
Thomas Athanasiou's user avatar
1 vote
6 answers
5k views

HTML codes inside alt tags

Is it ok to put html codes inside alt tags? I have a slider that uses alt tags for description. In order style the description, I have to put html codes. My problem is I dont know if it will harm ...
user1500330's user avatar
2 votes
5 answers
299 views

How to use alt attributes and make sure IE does not use them as tooltips?

Our website has a graphical main menu (i.e. text is done in image editor then displayed as an image), but whenever I hover over the menu item, it will display a tooltip. (e.g. when I hover over "...
ytk's user avatar
  • 311
0 votes
4 answers
4k views

How do I prevent alt text appearing when hovering over an image?

I've tried adding title="" but my alt text still appears when I hover over the photos in FF and Safari... Anything else I can try? Here's my example page: http://ianmartinphotography.com/test-site/...
ian_6500's user avatar
  • 358
101 votes
7 answers
88k views

Accessibility: recommended alt-text convention for SVG and MathML?

Overview HTML5 now allows <svg> and <math> markup with an HTML document without depending on external namespaces (decent overview here). Both have their own alt-attribute analogs (see ...
Courtney Christensen's user avatar
16 votes
3 answers
646 views

Is alt="" appropriate in some situations for html img tag?

We have a project that is all about web accessibility compliance. About a week from launch we have the accessibility committee reviewing our site to give the final thumbs up. However, they reported ...
Chris's user avatar
  • 11.9k
1 vote
1 answer
979 views

In coldfusion how can I find the filesize of a linked file and use that as an alt attribute

I have a large list with icons linking to pdf and msword files. I'd like to get the filesize in kb of the linked file then use that as the alt attribute on the image. The generated code would look ...
Fireflight's user avatar
  • 2,961
0 votes
3 answers
2k views

why is the <img> alt attribute not always properly displayed

So I have this php script that output an html table with data about some files (like filename, filesize, etc...) I have this javascript function that displays the picture when you hover a tag ...
Pierre's user avatar
  • 5,006
6 votes
7 answers
7k views

Can I wrap img alt text?

I have an image set by css style to 100x75. When it doesn't load, the alt text loads into the space, but expands the container to beyond 100px width. How can I prevent this? Either by cutting it off ...
Khan's user avatar
  • 2,932
1 vote
4 answers
827 views

How to suppress popping-up of alt tooltip for an AREA tag?

I am using an image map which contains a lot of <area> tags. I have alt attributes for each of the area which gets popped up as a tooltip in IE. Can we suppress this behavior? I tried using ...
vpram86's user avatar
  • 5,860
0 votes
4 answers
2k views

Extracting caption from alt attribute and inserting into a div

I am using the rather lovely jQuery slideviewer 1.1 plugin on a site at the moment, but would like to extract the alt attribute from images displayed and insert them into a div at the appropriate time....
user avatar
3 votes
3 answers
817 views

Within headers, images with alt text vs. text

Do search engines treat the alt text of an image placed within an h1 tag the same way they would treat regular text placed in an h1 tag? I gave a search through here looking for an answer to this ...
Court's user avatar
  • 31
1 vote
1 answer
1k views

Pulling alt's value

I am looking to use Javascript or jQuery to pull the alt tag from the specific image that had been clicked in the HTML and copy its value into a caption field. function change_image(diff){ var ...
Slevin's user avatar
  • 312
0 votes
1 answer
1k views

Umbraco CMS stripping ALT tags from images when content saved

Umbraco is taking: <img alt="Your Title - for example Mr., Mrs., Ms." src="../media/21283/q16x16.gif" width="16" height="15"/> And turning it into <img alt="" src="/media/21283/q16x16.gif"...
user avatar
2 votes
5 answers
8k views

How to change alt attribute of an image several times with jQuery?

This question completes the first one that I asked here about how to change an image on click using jQuery. I forgot to say (even if I edited my post later) that I'm looking for a way to have a ...
Mark's user avatar
  • 165
5 votes
2 answers
53k views

How to change image and alt attribute on click?

I'm looking to change several images onclick using JQuery instead of normal JavaScript and also change the image alt attribute at the same time for accessibility. It should be something easy as I'm ...
Mark's user avatar
  • 165