Skip to content

Commit

Permalink
fix(field-group): apply role when none present
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Nov 6, 2023
1 parent f745c90 commit 3616199
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/field-group/src/FieldGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ export class FieldGroup extends ManageHelpText(SpectrumElement, {
`;
}

protected override firstUpdated(changes: PropertyValues): void {
super.firstUpdated(changes);
if (!this.hasAttribute('role')) {
this.setAttribute('role', 'group');
}
}

protected override updated(changes: PropertyValues<this>): void {
super.updated(changes);
if (changes.has('label')) {
Expand Down

0 comments on commit 3616199

Please sign in to comment.