Improve Server Pro tests to use semantic selectors (#29790)

* Replace placeholders with labels

* Add 'Close dialog' label to modal close button to distinguish from footer Close button

* Add and translate heading on the not found page

* Update textarea to have id matching label's for attribute
Simplify test for template description textarea

* Label PDF zoom level dropdown button

* Improve test selectors to use semantic roles and accessible names

GitOrigin-RevId: d215ddca30ddf844cfffbcf0e528a601b134d772
This commit is contained in:
Rebeka Dekany
2025-11-25 09:05:48 +00:00
committed by Copybot
parent 7dce5f0e25
commit b4bfff1b67
24 changed files with 294 additions and 223 deletions
@@ -8,6 +8,7 @@ import {
} from 'react-bootstrap'
import { ModalBodyProps } from 'react-bootstrap/ModalBody'
import type { Options as FocusTrapOptions } from 'focus-trap'
import { useTranslation } from 'react-i18next'
type OLModalProps = ModalProps & {
size?: 'sm' | 'lg'
@@ -52,8 +53,13 @@ export function OLModalHeader({
closeButton = true,
...props
}: OLModalHeaderProps) {
const { t } = useTranslation()
return (
<Modal.Header closeButton={closeButton} {...props}>
<Modal.Header
closeButton={closeButton}
closeLabel={t('close_dialog')}
{...props}
>
{children}
</Modal.Header>
)