Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@
"jsx-a11y/alt-text": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/control-has-associated-label": "off",
"jsx-a11y/control-has-associated-label": [
"error",
{
"depth": 4,
"ignoreElements": ["audio", "canvas", "embed", "input", "textarea", "tr", "td", "video"]
}
],
Comment thread
carderne marked this conversation as resolved.
Comment thread
carderne marked this conversation as resolved.
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/components/code/ChartConfigPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ function SeriesColorPicker({
<PopoverTrigger asChild>
<button
type="button"
aria-label="Change series color"
className="shrink-0 rounded p-0.5 hover:bg-background-raised"
title="Change series color"
>
Expand Down
3 changes: 3 additions & 0 deletions apps/webapp/app/components/primitives/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -572,17 +572,20 @@ export interface SelectButtonItemProps extends Omit<Ariakit.SelectItemProps, "on
icon?: React.ReactNode;
checkIcon?: React.ReactNode;
shortcut?: ShortcutDefinition;
accessibleLabel: string;
onClick: React.ComponentProps<"button">["onClick"];
}

export function SelectButtonItem({
checkIcon = <Ariakit.SelectItemCheck className="size-8 flex-none text-white" />,
accessibleLabel,
onClick,
...props
}: SelectButtonItemProps) {
const render = (
<button
type="button"
aria-label={accessibleLabel}
onClick={onClick}
className={cn("block w-full text-left", selectItemClasses, props.className)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,10 @@ type ViewAllDataRowProps = {

function ViewAllDataRow({ remainingCount, onViewAll }: ViewAllDataRowProps) {
return (
<div
<button
type="button"
className="relative flex w-full cursor-pointer items-center justify-between gap-2 rounded px-2 py-1 transition hover:bg-background-dimmed"
onClick={onViewAll}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
onViewAll?.();
}
}}
>
<div className="relative flex w-full items-center justify-between gap-3">
<div className="flex items-center gap-1.5">
Expand All @@ -321,7 +314,7 @@ function ViewAllDataRow({ remainingCount, onViewAll }: ViewAllDataRowProps) {
</div>
<span className="self-start text-indigo-500">View all</span>
</div>
</div>
</button>
);
}

Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/components/runs/v3/RunFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ function MainMenu({ searchValue, trigger, clearSearchValue, setFilterType }: Men
{filtered.map((type, index) => (
<SelectButtonItem
key={type.name}
accessibleLabel={type.title}
onClick={() => {
clearSearchValue();
setFilterType(type.name);
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/components/sessions/v1/SessionFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ function MainMenu({ searchValue, trigger, clearSearchValue, setFilterType }: Men
{filtered.map((type, index) => (
<SelectButtonItem
key={type.name}
accessibleLabel={type.title}
onClick={() => {
clearSearchValue();
setFilterType(type.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function MainMenu({ trigger, clearSearchValue, setFilterType }: MenuProps) {
{filterTypes.map((type, index) => (
<SelectButtonItem
key={type.name}
accessibleLabel={type.title}
onClick={() => {
clearSearchValue();
setFilterType(type.name);
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/routes/storybook.filter/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function MainMenu({ searchValue, clearSearchValue, setFilterType, trigger, short
{filtered.map((type, index) => (
<SelectButtonItem
key={type.name}
accessibleLabel={type.title}
onClick={() => {
clearSearchValue();
setFilterType(type.name);
Expand Down
Loading