Closed (fixed)
Project:
Dismiss
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2013 at 13:21 UTC
Updated:
21 Sep 2013 at 20:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
dcmouyard commentedHere's a patch.
The button element has more semantic meaning and provides better functionality with the accessibility API in browsers.
Comment #2
ruplThanks for fixing this. Your patch is a very straightforward example that will help me write more accessible JS in general.
One question. As I looked at the code, I started wondering if jQuery
append()would be better thanprepend(). I don't have a screen reader, so you have an opinion on whether the "Close this message" text should be read before or after the actual message?Comment #3
dcmouyard commentedThat's a tough one, but prepend is probably better.
Having it before the message gives it the correct tab order and allows screen readers to close the message without having to hear it first. It might cause confusion, though, since you won't know exactly what you're closing at first.
Comment #4
ruplAlrighty then, patch in #1 is committed!