Closed huyenltnguyen closed 1 week ago
The label of the answers should be rendered as a div instead of a p, otherwise there would be an a11y issue when the label contains PrismFormatted (which could render as a div).
div
p
PrismFormatted
Remove as="p" from this line:
as="p"
https://github.com/freeCodeCamp/ui/blob/6cc3039debdfdbfe0c88f2aab8187af6b23436c5/src/quiz-question/answer.tsx#L92
Description
The label of the answers should be rendered as a
div
instead of ap
, otherwise there would be an a11y issue when the label containsPrismFormatted
(which could render as adiv
).Error when the label contains PrismFormatted
Changes needed
Remove
as="p"
from this line:https://github.com/freeCodeCamp/ui/blob/6cc3039debdfdbfe0c88f2aab8187af6b23436c5/src/quiz-question/answer.tsx#L92