1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 23:35:31 +02:00

feat(a11y): add labels and roles [EE-6717] (#11181)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run

This commit is contained in:
Chaim Lev-Ari 2024-02-19 16:37:26 +02:00 committed by GitHub
parent 6c89d3c0c9
commit ce3a1b8ba5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 72 additions and 30 deletions

View file

@ -212,6 +212,7 @@ export function EnvironmentList({ onClickBrowse, onRefresh }: Props) {
<div
className="blocklist mt-5 !space-y-2 !p-0"
data-cy="home-endpointList"
role="list"
>
{renderItems(
isLoading,

View file

@ -31,9 +31,10 @@ export function RefField({
stackId,
}: Props) {
const [inputValue, updateInputValue] = useStateWrapper(value, onChange);
const inputId = 'repository-reference-field';
return isBE ? (
<Wrapper
inputId={inputId}
errors={error}
tip={
<>
@ -44,6 +45,7 @@ export function RefField({
}
>
<RefSelector
inputId={inputId}
value={value}
onChange={onChange}
model={model}
@ -53,6 +55,7 @@ export function RefField({
</Wrapper>
) : (
<Wrapper
inputId={inputId}
errors={error}
tip={
<>
@ -65,6 +68,7 @@ export function RefField({
}
>
<Input
id={inputId}
value={inputValue}
onChange={(e) => updateInputValue(e.target.value)}
placeholder="refs/heads/main"
@ -77,7 +81,8 @@ function Wrapper({
tip,
children,
errors,
}: PropsWithChildren<{ tip: ReactNode; errors?: string }>) {
inputId,
}: PropsWithChildren<{ tip: ReactNode; errors?: string; inputId: string }>) {
return (
<div className="form-group">
<span className="col-sm-12 mb-2">
@ -86,7 +91,7 @@ function Wrapper({
<div className="col-sm-12">
<FormControl
label="Repository reference"
inputId="stack_repository_reference_name"
inputId={inputId}
required
errors={errors}
>

View file

@ -13,12 +13,14 @@ export function RefSelector({
onChange,
isUrlValid,
stackId,
inputId,
}: {
model: RefFieldModel;
value: string;
stackId?: StackId;
onChange: (value: string) => void;
isUrlValid?: boolean;
inputId: string;
}) {
const creds = getAuthentication(model);
const payload = {
@ -64,6 +66,7 @@ export function RefSelector({
return (
<PortainerSelect
inputId={inputId}
value={value}
options={refs || [{ value: 'refs/heads/main', label: 'refs/heads/main' }]}
onChange={(e) => e && onChange(e)}

View file

@ -86,7 +86,7 @@ export function AppTemplatesList({
}
/>
<div className="blocklist gap-y-2 !px-[20px] !pb-[20px]">
<div className="blocklist gap-y-2 !px-[20px] !pb-[20px]" role="list">
{pagedTemplates.map((template) => (
<AppTemplatesListItem
key={template.Id}

View file

@ -55,6 +55,7 @@ export function Filters({
value={listState.category}
bindToBody
isClearable
aria-label="Category filter"
/>
</div>
)}
@ -71,6 +72,7 @@ export function Filters({
value={listState.types}
bindToBody
isClearable
aria-label="Type filter"
/>
</div>
)}
@ -83,6 +85,7 @@ export function Filters({
options={orderByFields}
placeholder="Sort By"
value={listState.sortBy}
aria-label="Sort"
/>
</div>
</div>

View file

@ -63,7 +63,7 @@ export function CustomTemplatesList({
)}
/>
<div className="blocklist gap-y-2 !px-[20px] !pb-[20px]">
<div className="blocklist gap-y-2 !px-[20px] !pb-[20px]" role="list">
{pagedTemplates.map((template) => (
<CustomTemplatesListItem
key={template.Id}