Skip to content

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

A11Y: topic map aria-controls needs an ID (#26308)

Kris0d890e1f9841
diff --git a/app/assets/javascripts/discourse/app/components/topic-map.gjs b/app/assets/javascripts/discourse/app/components/topic-map.gjs
index c9f43914dc2..4c11d92f691 100644
--- a/app/assets/javascripts/discourse/app/components/topic-map.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-map.gjs
@@ -25,7 +25,10 @@ export default class TopicMap extends Component {
/>
</section>
{{#unless this.collapsed}}
- <section class="topic-map-expanded">
+ <section
+ class="topic-map-expanded"
+ id="topic-map-expanded__aria-controls"
+ >
<TopicMapExpanded @postAttrs={{@postAttrs}} />
</section>
{{/unless}}
diff --git a/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs b/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs
index 7b8d412f819..bd580190d06 100644
--- a/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs
+++ b/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs
@@ -17,7 +17,7 @@ export default class TopicMapSummary extends Component {
: "topic.collapse_details",
icon: this.args.collapsed ? "chevron-down" : "chevron-up",
ariaExpanded: this.args.collapsed ? "false" : "true",
- ariaControls: "topic-map-expanded",
+ ariaControls: "topic-map-expanded__aria-controls",
action: this.args.toggleMap,
};
}