Change polls to use fieldset/legend markup (#31160)

* Change polls to use fieldset/legend markup

* Update MPollEndBody-test.tsx.snap

* Fix letter spacing in legend

* Update PollHistory-test.tsx.snap
This commit is contained in:
David Langley
2025-11-04 09:55:35 +00:00
committed by GitHub
parent c14d072cb7
commit 4e57b80556
5 changed files with 56 additions and 51 deletions

View File

@@ -325,11 +325,11 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
) : null;
return (
<div className="mx_MPollBody">
<h2 data-testid="pollQuestion">
<fieldset className="mx_MPollBody">
<legend data-testid="pollQuestion">
{pollEvent.question.text}
{editedSpan}
</h2>
</legend>
<div className="mx_MPollBody_allOptions">
{pollEvent.answers.map((answer: PollAnswerSubevent) => {
let answerVotes = 0;
@@ -360,7 +360,7 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
{totalText}
{isFetchingResponses && <Spinner w={16} h={16} />}
</div>
</div>
</fieldset>
);
}
}