Skip to content

Commit daeff64

Browse files
fix(AttachButton): Hide input from screenreaders (#426)
There is a required input for react-dropzone. We should hide it from screenreaders since it's not something users can interact with.
1 parent b3af2fd commit daeff64

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/module/patternfly-docs/content/extensions/chatbot/examples/UI/ChatbotMessageBarAttach.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const ChatbotMessageBarDefaultAttachExample: React.FunctionComponent = ()
126126
return (
127127
<>
128128
{/* this is required for react-dropzone to work in Safari and Firefox */}
129-
<input {...getInputProps()} />
129+
<input {...getInputProps()} hidden />
130130
<MessageBar
131131
onSendMessage={handleSend}
132132
attachMenuProps={{

packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/ChatbotAttachmentMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export const AttachmentMenuDemo: React.FunctionComponent = () => {
209209
return (
210210
<>
211211
{/* this is required for react-dropzone to work in Safari and Firefox */}
212-
<input {...getInputProps()} />
212+
<input {...getInputProps()} hidden />
213213
<ChatbotToggle
214214
tooltipLabel="Chatbot"
215215
isChatbotVisible={chatbotVisible}

packages/module/src/MessageBar/AttachButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const AttachButtonBase: React.FunctionComponent<AttachButtonProps> = ({
4646
return (
4747
<>
4848
{/* this is required for react-dropzone to work in Safari and Firefox */}
49-
<input data-testid={inputTestId} {...getInputProps()} />
49+
<input data-testid={inputTestId} {...getInputProps()} hidden />
5050
<Tooltip
5151
id="pf-chatbot__tooltip--attach"
5252
content={tooltipContent}

0 commit comments

Comments
 (0)