Questions tagged [alt-attribute]

35 questions
98
votes
7 answers

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

Overview HTML5 now allows and markup with an HTML document without depending on external namespaces (decent overview here). Both have their own alt-attribute analogs (see below) which are effectively ignored by today's screen-reader…
Courtney Christensen
  • 9,165
  • 5
  • 47
  • 56
16
votes
3 answers

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 back to us that we should set alt="" on some of…
Chris
  • 11,780
  • 13
  • 48
  • 70
6
votes
7 answers

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 or wrapping it.
Khan
  • 2,912
  • 3
  • 21
  • 21
5
votes
2 answers

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 not looking to do some special effect on change but…
Mark
  • 165
  • 1
  • 7
  • 18
4
votes
2 answers

Is there an 'alt' attribute for the tag? — Use case: picture element without

I am using tags. My target group uses modern browsers, so as soon as Firefox supports WebP there is no need to use the tag. Now:
dash
  • 1,249
  • 3
  • 17
  • 25
3
votes
3 answers

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 question, but was only able to find information on…
Court
  • 31
  • 1
2
votes
5 answers

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 different alt attribute each time an image is changed…
Mark
  • 165
  • 1
  • 7
  • 18
2
votes
5 answers

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 "Contact Us", another "Contact Us" pops up as…
ytk
  • 311
  • 1
  • 5
  • 15
1
vote
0 answers

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 alternative text error for this image.
1
vote
1 answer

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 something like this. Description of file
Fireflight
  • 2,921
  • 5
  • 24
  • 22
1
vote
4 answers

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

I am using an image map which contains a lot of 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 empty title attribute but it did not work. Edit: I need the…
vpram86
  • 5,860
  • 4
  • 28
  • 40
1
vote
1 answer

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 newAlt = $(this).attr('alt'); position = (position +…
Slevin
  • 312
  • 2
  • 12
1
vote
6 answers

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 SEO or any other things to consider..
user1500330
  • 51
  • 2
  • 8
0
votes
0 answers

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 results, it breaks points because the alt image…
0
votes
0 answers

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+left or alt+right to strafe left or right without…
echocosm
  • 33
  • 2
1
2 3