Skip to content

Commit e26ea6f

Browse files
committed
Twitter: Fix counter as description of tweet box for latest Twitter.
1 parent 9494a4c commit e26ea6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TwitterA11yFixes.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ function onFocus(evt) {
8181
elm.setAttribute("role", "button");
8282
target.setAttribute("aria-activedescendant", id);
8383

84-
} else if (tag == "TEXTAREA" && classes == "twitter-anywhere-tweet-box-editor") {
84+
} else if (tag == "TEXTAREA" && classes == "tweet-box") {
8585
// This is a tweet box.
8686
if (target.getAttribute("aria-describedby"))
8787
return;
8888
// Make the tweet counter the description of the tweet box for easy access.
89-
var elm = target.parentNode.parentNode.parentNode.getElementsByClassName("tweet-counter")[0];
89+
var elm = target.parentNode.parentNode.getElementsByClassName("tweet-counter")[0];
9090
var id = "counter" + ++idCounter;
9191
elm.setAttribute("id", id);
9292
target.setAttribute("aria-describedby", id);

0 commit comments

Comments
 (0)