Closed Bug 414387 Opened 12 years ago Closed 12 years ago

Emoticon graphics don't have alt text

Categories

(Other Applications :: ChatZilla, defect, minor)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: MarcoZ, Assigned: bugzilla-mozilla-20000923)

Details

(Keywords: access, Whiteboard: [cz-0.9.81])

Attachments

(1 file)

When converting an emoticon such as :-) to a graphic, the graphic does not get alt text, and thus it will be ignored by screen readers by default. Suggestion: Use the original characters that made up the emoticon as the alt text.
So as I was busy telling you on IRC, the emoticons can't actually have alt text because they're content in a pseudo class. I don't remember the exact reasons why they're not just images, though I'm sure I've asked at some point (maybe more than once!) and there *was* a reasonable reason for it. But I doubt we can add alt text on the CSS pseudo-classes, and I doubt that adding an alt-attribute to the <span> which we use for the emoticon text will help anything, given it's display:hidden;

As a workaround, you can simply turn off emoticons in the preference window.
Summary: Emoticon graphics don#t havve alt text. → Emoticon graphics don't have alt text
Two spans are used:

<span class="chatzilla-emote-txt" type="face-smile"> :) </span><span class="chatzilla-emote" type="face-smile" title=" :) "/>

The first span is display: none, the second has generated content to show the correct image. The text inside the first span is still copied into selections - that is why it is done like that. I can quite see the screen readers not reading the hidden text, but why don't they read the title?
Severity: normal → minor
Does the second one use a background image then?

That would be why.
It uses generated content, as I said; specifically:
  :after { content: url(...); }
Right, we wouldn't use the title in that case.

Can you try role="image" on it? I think that will fix it:

<span class="chatzilla-emote" role="image" type="face-smile" title=" :) "/>
Unfortunately, FireVox doesn't want to read out emoticons even when they're just plain text, and I can't find an option to change that (sometimes it reads some of the characters, but never all).

Any ideas on an actual way I can test this at all?

P.S. Listening to FireVox read out JavaScript code is highly amusing. :)
Actually, I just realised that if it's reading some, I can test it. FireVox still omits the majority of the punctuation involved, but it does read some of the title out with role="image", so I guess we have a fix.
And since Fire Vox uses the DOM it's really a different test from what normal users have.

You can have Marco test this fix with a screen reader like JAWS.
OK, so forget that test I did; FireVox is reading out the title *anyway*. Sigh.

If anyone has a real way to test this, please try out the version below and let us know. It is the currently trunk code plus role="image".

  http://twpol.dyndns.org/temp/chatzilla-0.9.80-bug414387.xpi
I verified in Accessible Explorer that the fix works. On trunk, it actually figures out it's an image, but even on branch (where it thinks it's a span) it does show the text in the "name" field, which I believe is the desired behaviour. On both trunk and branch, before this fix, it simply didn't think there was anything there :-).

James, if you could attach the patch you used for that build, that'd be excellent!
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #302665 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 302665 [details] [diff] [review]
Add role=image to emoticons

r=me

Now if only the tree wasn't closed. :-)
Attachment #302665 - Flags: review?(gijskruitbosch+bugs) → review+
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.81]
You need to log in before you can comment on or make changes to this bug.