Skip to content

Commit 7e6e7a2

Browse files
jwyungjcsteh
authored andcommitted
Slack: Remove extra a11y attributes from close_flexpane button (#11)
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 - Update "Slack Accessibility Fixes" in README to reflect the above changes
1 parent c011ddf commit 7e6e7a2

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
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.

readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ It does the following:
7171
- Makes options for each message (Start a thread, Share message, etc.) accessible.
7272
To access these, move the mouse to the text of a message.
7373
They then appear above the author's name as buttons.
74-
- Makes the close link for the about channel pane accessible.
7574
- Makes day separators in the message history and the about channel pane heading accessible as headings.
7675
- Reports incoming messages automatically (using a live region).
7776
- Hides an editable area which isn't shown visually.

0 commit comments

Comments
 (0)