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

STSMACOM-882 <NoteFields> improve "Display as pop-up" markup and fix label a11y issue. #1553

Merged
merged 3 commits into from
Jan 8, 2025
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Remove unnecessary `aria-rowindex` in `ItemView` and `ItemEdit` components. Fixes STSMACOM-871.
* Check for `active` status of `<Settings>` navigation links independently from the applied href and query string. Query string should only be applied to active link. Refs STSMACOM-837.
* `<EditableListForm>` use `lodash.isEmpty` to check for empty `state.status` in re-initialization checks on component update. Fixes STSMACOM-876.
* `<NoteFields>` improve "Display as pop-up" markup and fix label a11y issue. Refs STSMACOM-882.

## [9.2.3] IN PROGRESS

Expand Down
56 changes: 23 additions & 33 deletions lib/Notes/components/NoteForm/components/NoteFields/NoteFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,39 +90,29 @@ export default class NoteFields extends Component {
{showDisplayAsPopupOptions && (
<Row>
<Col xs={12}>
<Row>
<Col xs={12}>
<Label tagName="div">
<span className={styles.heading}>
<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.label" />
</span>
</Label>
</Col>
</Row>
<Row>
<Col xs={12}>
<Field
name="popUpOnCheckOut"
type="checkbox"
component={Checkbox}
data-test-note-popup-on-checkout-field
label={<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.checkout" />}
readOnly={fieldsAreDisabled}
/>
</Col>
</Row>
<Row>
<Col xs={12}>
<Field
name="popUpOnUser"
type="checkbox"
component={Checkbox}
data-test-note-popup-on-users-field
label={<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.users" />}
readOnly={fieldsAreDisabled}
/>
</Col>
</Row>
<Label id="display-as-popup-group-label">
<span className={styles.heading}>
<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.label" />
</span>
</Label>
<fieldset aria-labelledby="display-as-popup-group-label">
<Field
name="popUpOnCheckOut"
type="checkbox"
component={Checkbox}
data-test-note-popup-on-checkout-field
label={<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.checkout" />}
readOnly={fieldsAreDisabled}
/>
<Field
name="popUpOnUser"
type="checkbox"
component={Checkbox}
data-test-note-popup-on-users-field
label={<FormattedMessage id="stripes-smart-components.notes.displayAsPopup.users" />}
readOnly={fieldsAreDisabled}
/>
</fieldset>
</Col>
</Row>
)}
Expand Down
Loading