Skip to content

Commit 46428ca

Browse files
committed
Slack: Remove extra a11y attributes from close_flexpane button
Based on the `close_flexpane` button markup on Slack now, we have: `<button class="btn_basic close_flexpane" aria-label="Close Right Sidebar" title="Close Right Sidebar" type="button">` - Since this element is a `<button>`, the `role` attribute is no longer necessary - Since this element has an `aria-label` attribute, we no longer need to add one
1 parent 6c2b1d9 commit 46428ca

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

SlackA11yFixes.user.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ function initial() {
1919
// Same for the unread messages status, which appears below in DOM order but earlier visually.
2020
if (elem = document.querySelector("#messages_container"))
2121
elem.setAttribute("aria-owns", "messages_unread_status threads_view_banner monkey_scroll_wrapper_for_msgs_scroller_div monkey_scroll_wrapper_for_threads_msgs_scroller_div");
22-
// Make close link for about channel pane accessible.
23-
for (elem of document.querySelectorAll(".close_flexpane")) {
24-
elem.setAttribute("role", "button");
25-
// The content is a private use Unicode character. Use the title as the name.
26-
elem.setAttribute("aria-label", elem.getAttribute("title"));
27-
}
2822
}
2923

3024
// Make the starred status accessible.

0 commit comments

Comments
 (0)