Skip to content

Commit e67e233

Browse files
anna-dinglerjwoo-msft
authored andcommitted
Only add additional labels to the first checkbox in a multi select input (#8912)
1 parent 9b7e2a5 commit e67e233

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/nodejs/adaptivecards/src/card-elements.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4525,14 +4525,20 @@ export class ChoiceSetInput extends Input {
45254525
const labelIds: string[] = this.getAllLabelIds();
45264526

45274527
for (let i = 0; i < this._toggleInputs.length; i++) {
4528-
let joinedLabelIds = labelIds.join(" ");
4528+
let joinedLabelIds = "";
4529+
4530+
// Only include the overall information for the first input
4531+
if (i === 0) {
4532+
joinedLabelIds = labelIds.join(" ");
4533+
}
4534+
45294535
const label = this._labels[i];
45304536

45314537
if (label && label.id) {
45324538
joinedLabelIds += " " + label.id;
45334539
}
45344540

4535-
if (joinedLabelIds) {
4541+
if (joinedLabelIds !== "") {
45364542
this._toggleInputs[i].setAttribute("aria-labelledby", joinedLabelIds);
45374543
} else {
45384544
this._toggleInputs[i].removeAttribute("aria-labelledby");

0 commit comments

Comments
 (0)