Skip to content

A platform for community discussion. Free, open, simple.

A11Y: remove aria-controls from expandable replies in topic (#35333)

Krisab6a3e489f58
diff --git a/app/assets/javascripts/discourse/app/components/post/menu/buttons/replies.gjs b/app/assets/javascripts/discourse/app/components/post/menu/buttons/replies.gjs
index c63f3eea631..cb1c99eae07 100644
--- a/app/assets/javascripts/discourse/app/components/post/menu/buttons/replies.gjs
+++ b/app/assets/javascripts/discourse/app/components/post/menu/buttons/replies.gjs
@@ -1,5 +1,4 @@
import Component from "@glimmer/component";
-import { concat } from "@ember/helper";
import { service } from "@ember/service";
import { and, not } from "truth-helpers";
import DButton from "discourse/components/d-button";
@@ -47,7 +46,6 @@ export default class PostMenuRepliesButton extends Component {
...attributes
disabled={{this.disabled}}
@action={{@buttonActions.toggleReplies}}
- @ariaControls={{concat "embedded-posts__bottom--" @post.post_number}}
@ariaExpanded={{and @state.repliesShown (not @state.filteredRepliesView)}}
@ariaPressed={{unless @state.filteredRepliesView @state.repliesShown}}
@translatedAriaLabel={{i18n
diff --git a/app/assets/javascripts/discourse/app/components/post/meta-data/reply-to-tab.gjs b/app/assets/javascripts/discourse/app/components/post/meta-data/reply-to-tab.gjs
index f977865e83a..fc529ff692f 100644
--- a/app/assets/javascripts/discourse/app/components/post/meta-data/reply-to-tab.gjs
+++ b/app/assets/javascripts/discourse/app/components/post/meta-data/reply-to-tab.gjs
@@ -1,5 +1,4 @@
import Component from "@glimmer/component";
-import { concat } from "@ember/helper";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { service } from "@ember/service";
@@ -34,10 +33,6 @@ export default class PostMetaDataReplyToTab extends Component {
class="reply-to-tab"
disabled={{@repliesAbove.isPending}}
role={{if this.site.desktopView "button"}}
- aria-controls={{if
- this.site.desktopView
- (concat "embedded-posts__top--" @post.post_number)
- }}
aria-expanded={{if this.site.desktopView @hasRepliesAbove}}
title="post.in_reply_to"
{{on "click" this.handleClick}}