Skip to content

Commit cffabd5

Browse files
iobuhovgjulivan
authored andcommitted
fix: update props
1 parent ae98da6 commit cffabd5

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages/pluggableWidgets/datagrid-date-filter-web/src/components/DatePicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function DatePicker(props: DatePickerProps): ReactElement {
3939
<Fragment>
4040
<div id={staticProps.portalId} className="date-filter-container" />
4141
<span className="sr-only" id={`${props.id}-label`}>
42-
{props.screenReaderInputCaption}
42+
{props.screenReaderInputCaption || "date filter"}
4343
</span>
4444
<ReactDatePicker
4545
{...staticProps}
@@ -76,7 +76,7 @@ export function DatePicker(props: DatePickerProps): ReactElement {
7676
aria-controls={staticProps.portalId}
7777
aria-expanded={props.expanded}
7878
aria-haspopup
79-
aria-label={props.screenReaderCalendarCaption ?? "Show calendar"}
79+
aria-label={props.screenReaderCalendarCaption || "Show calendar"}
8080
className="btn btn-default btn-calendar"
8181
onMouseDown={props.onButtonMouseDown}
8282
onKeyDown={props.onButtonKeyDown}

packages/shared/widget-plugin-dropdown-filter/src/controls/combobox/Combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const Combobox = observer(function Combobox(props: ComboboxProps) {
4444
<input
4545
className={cls.input}
4646
{...getInputProps({
47-
"aria-label": props.ariaLabel,
47+
"aria-label": props.ariaLabel || "filter",
4848
ref: inputRef,
4949
onBlur: props.onBlur,
5050
onFocus: props.onFocus,

packages/shared/widget-plugin-dropdown-filter/src/controls/select/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Select = observer(function Select(props: SelectProps): React.ReactE
4141
data-empty={isEmpty ? true : undefined}
4242
style={props.style}
4343
{...getToggleButtonProps({
44-
"aria-label": props.ariaLabel,
44+
"aria-label": props.ariaLabel || "filter",
4545
ref: refs.setReference,
4646
onFocus: props.onFocus
4747
})}

packages/shared/widget-plugin-dropdown-filter/src/controls/tag-picker/TagPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const TagPicker = observer(function TagPicker(props: TagPickerProps): Rea
9999
<input
100100
className={cls.input}
101101
{...getInputProps({
102-
"aria-label": inputLabel,
102+
"aria-label": inputLabel || "filter",
103103
onBlur: props.onBlur,
104104
onFocus: props.onFocus,
105105
placeholder: props.empty ? (isOpen ? props.inputPlaceholder : props.emptyCaption) : undefined,

packages/shared/widget-plugin-filtering/src/controls/input/InputWithFilters.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { createElement } from "react";
2-
import { observer } from "mobx-react-lite";
1+
import { AllFunctions } from "@mendix/filter-commons/typings/FilterFunctions";
32
import classNames from "classnames";
3+
import { observer } from "mobx-react-lite";
4+
import { createElement } from "react";
45
import { FilterSelector } from "../filter-selector/FilterSelector";
56
import { InputComponentProps } from "./typings";
6-
import { AllFunctions } from "@mendix/filter-commons/typings/FilterFunctions";
77

88
export function InputWithFiltersComponent<Fn extends AllFunctions>(props: InputComponentProps<Fn>): React.ReactElement {
99
const {
@@ -25,7 +25,7 @@ export function InputWithFiltersComponent<Fn extends AllFunctions>(props: InputC
2525
)}
2626
<input
2727
aria-invalid={input1.isValid ? undefined : true}
28-
aria-label={props.screenReaderInputCaption}
28+
aria-label={props.screenReaderInputCaption || "filter"}
2929
className={classNames("form-control", { "filter-input": props.adjustable })}
3030
disabled={props.disableInputs}
3131
onChange={input1.onChange}

0 commit comments

Comments
 (0)