Skip to content
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

[MA-12]: Add label to form field in channel header #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`components/AutosizeTextarea should match snapshot, init 1`] = `
/>
<textarea
aria-label=""
aria-labelledby="autosize_textarea_label"
data-testid="autosize_textarea"
dir="auto"
height={0}
Expand Down
1 change: 1 addition & 0 deletions webapp/channels/src/components/autosize_textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ const AutosizeTextarea = React.forwardRef<HTMLTextAreaElement, Props>(({
{...otherProps}
role='textbox'
aria-label={placeholderAriaLabel}
aria-labelledby={`${id}_label`}
dir='auto'
disabled={disabled}
onChange={onChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,21 @@ exports[`components/EditChannelHeaderModal edit direct message channel 1`] = `
componentClass="div"
>
<div>
<p>
<label
htmlFor="edit_textbox"
id="edit_textbox_label"
style={
Object {
"fontWeight": "400",
"marginBottom": "10px",
}
}
>
<MemoizedFormattedMessage
defaultMessage="Edit the text appearing next to the channel name in the header."
id="edit_channel_header_modal.description"
/>
</p>
</label>
<div
className="textarea-wrapper"
>
Expand Down Expand Up @@ -183,12 +192,21 @@ exports[`components/EditChannelHeaderModal error with intl message 1`] = `
componentClass="div"
>
<div>
<p>
<label
htmlFor="edit_textbox"
id="edit_textbox_label"
style={
Object {
"fontWeight": "400",
"marginBottom": "10px",
}
}
>
<MemoizedFormattedMessage
defaultMessage="Edit the text appearing next to the channel name in the header."
id="edit_channel_header_modal.description"
/>
</p>
</label>
<div
className="textarea-wrapper"
>
Expand Down Expand Up @@ -331,12 +349,21 @@ exports[`components/EditChannelHeaderModal error without intl message 1`] = `
componentClass="div"
>
<div>
<p>
<label
htmlFor="edit_textbox"
id="edit_textbox_label"
style={
Object {
"fontWeight": "400",
"marginBottom": "10px",
}
}
>
<MemoizedFormattedMessage
defaultMessage="Edit the text appearing next to the channel name in the header."
id="edit_channel_header_modal.description"
/>
</p>
</label>
<div
className="textarea-wrapper"
>
Expand Down Expand Up @@ -471,12 +498,21 @@ exports[`components/EditChannelHeaderModal should match snapshot, init 1`] = `
componentClass="div"
>
<div>
<p>
<label
htmlFor="edit_textbox"
id="edit_textbox_label"
style={
Object {
"fontWeight": "400",
"marginBottom": "10px",
}
}
>
<MemoizedFormattedMessage
defaultMessage="Edit the text appearing next to the channel name in the header."
id="edit_channel_header_modal.description"
/>
</p>
</label>
<div
className="textarea-wrapper"
>
Expand Down Expand Up @@ -601,12 +637,21 @@ exports[`components/EditChannelHeaderModal submitted 1`] = `
componentClass="div"
>
<div>
<p>
<label
htmlFor="edit_textbox"
id="edit_textbox_label"
style={
Object {
"fontWeight": "400",
"marginBottom": "10px",
}
}
>
<MemoizedFormattedMessage
defaultMessage="Edit the text appearing next to the channel name in the header."
id="edit_channel_header_modal.description"
/>
</p>
</label>
<div
className="textarea-wrapper"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,19 @@ export class EditChannelHeaderModal extends React.PureComponent<Props, State> {
</Modal.Header>
<Modal.Body bsClass='modal-body edit-modal-body'>
<div>
<p>
<label
htmlFor='edit_textbox'
id='edit_textbox_label'
style={{
fontWeight: '400',
marginBottom: '10px',
}}
>
<FormattedMessage
id='edit_channel_header_modal.description'
defaultMessage='Edit the text appearing next to the channel name in the header.'
/>
</p>
</label>
<div className='textarea-wrapper'>
<Textbox
value={this.state.header!}
Expand Down
Loading