mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
A11Y: add aria tags for topic map expansion (#20122)
This commit is contained in:
@@ -254,6 +254,8 @@ createWidget("topic-map-summary", {
|
||||
? "topic.expand_details"
|
||||
: "topic.collapse_details",
|
||||
icon: state.collapsed ? "chevron-down" : "chevron-up",
|
||||
ariaExpanded: state.collapsed ? "false" : "true",
|
||||
ariaControls: "topic-map-expanded",
|
||||
action: "toggleMap",
|
||||
className: "btn",
|
||||
})
|
||||
@@ -296,7 +298,7 @@ createWidget("topic-map-link", {
|
||||
});
|
||||
|
||||
createWidget("topic-map-expanded", {
|
||||
tagName: "section.topic-map-expanded",
|
||||
tagName: "section.topic-map-expanded#topic-map-expanded",
|
||||
buildKey: (attrs) => `topic-map-expanded-${attrs.id}`,
|
||||
|
||||
defaultState() {
|
||||
|
||||
Reference in New Issue
Block a user