-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add search box props for clear button aria attributes #3946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
755960a
2c70faf
81abef9
da36176
3dc342e
85c9a53
ba1045a
583d68f
9f554d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "changes": [{ | ||
| "packageName": "office-ui-fabric-react", | ||
| "comment": "Add clearButtonProps prop to SearchBox.types.ts with ariaLabel and ariaDescription. These are passed to the icon button in SearchBox.base.tsx", | ||
| "type": "minor" | ||
| }], | ||
| "packageName": "office-ui-fabric-react", | ||
| "email": "cohoov@microsoft.com" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,16 @@ export interface ISearchBoxProps extends React.InputHTMLAttributes<HTMLInputElem | |
| */ | ||
| ariaLabel?: string; | ||
|
|
||
| /** | ||
| * The aria label of the clear button for the SearchBox for the benefit of screen readers. | ||
| */ | ||
| clearButtonAriaLabel?: string; | ||
|
|
||
| /** | ||
| * The props for the clear button. | ||
| */ | ||
| clearButtonProps?: ISearchBoxClearButtonProps; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should just be
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd considered that but thought I'd start with the conservative approach of whitelisting properties. Is this the last blocking issue?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify: I will change this to ibuttonprops tomorrow, I'm just asking if there are other changes needed as well.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
|
||
| /** | ||
| * Whether or not the SearchBox is underlined. | ||
| * @default false | ||
|
|
@@ -96,4 +106,9 @@ export interface ISearchBoxStyles { | |
| icon?: IStyle; | ||
| field?: IStyle; | ||
| clearButton?: IStyle; | ||
| } | ||
|
|
||
| export interface ISearchBoxClearButtonProps { | ||
| ariaLabel?: string; | ||
| ariaDescription?: string; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to remove this. right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.