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

Simplify edit series form #1021

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

owi92
Copy link
Member

@owi92 owi92 commented Nov 27, 2023

This refactors the layout/order option inputs of series and video add/edit forms and simplifies the edit series buttons into regular radio/checkbox inputs.

Closes #1009

@owi92 owi92 added the changelog:user User facing changes label Nov 27, 2023
@github-actions github-actions bot temporarily deployed to test-deployment-pr1021 November 27, 2023 11:25 Destroyed
@github-actions github-actions bot temporarily deployed to test-deployment-pr1021 December 6, 2023 14:10 Destroyed
Copy link
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. This makes more sense, especially after putting the description in the box! Just two small things.

frontend/src/ui/Input.tsx Outdated Show resolved Hide resolved
frontend/src/ui/Input.tsx Outdated Show resolved Hide resolved
Comment on lines 117 to 142
<div>
<Heading>{t("series.settings.order")}</Heading>
<DisplayOptionGroup type="radio" optionProps={orderProps} {...{ form }} />
</div>
<div>
<Heading>{t("manage.realm.content.series.layout.heading")}</Heading>
<DisplayOptionGroup type="checkbox" optionProps={layoutProps} {...{ form }} />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a grouping necessary for accessibility? The radio buttons and checkboxes are not part of a fieldset. I would expect some aria-label as described in Approach 2 or a fieldset.
https://www.w3.org/WAI/tutorials/forms/grouping/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I think you are right, thank you for pointing it out.

@github-actions github-actions bot temporarily deployed to test-deployment-pr1021 January 11, 2024 11:36 Destroyed
This refactors the layout/order option inputs of series and
video add/edit forms and simplifies the edit series buttons
into regular radio/checkbox inputs.
@github-actions github-actions bot temporarily deployed to test-deployment-pr1021 January 11, 2024 12:07 Destroyed
Copy link
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I will merge this now already. If Gregors comment was not properly addressed, please let us know. But this can be addressed later, this PR didn't make anything worse in that regard.

@LukasKalbertodt LukasKalbertodt merged commit 6f7bb68 into elan-ev:master Jan 11, 2024
2 checks passed
<LayoutChooser {...{ currentLayout, form }} />
<div
role="group"
aria-labelledby={t("manage.realm.content.display-options")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be better to have a group for each DisplayOptionGroup? I tried it with the Fedora screen reader, which added context about the selected group and it read Panel Reihenfolge instead of h3 Reihenfolge. Or is that too verbose, and display options is enough?

aria-labelledby should be replaced with aria-label:

Suggested change
aria-labelledby={t("manage.realm.content.display-options")}
aria-label={t("manage.realm.content.display-options")}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, right again. Sorry for missing this, we have a lot going on right now. Would you be open to adjust that accordingly in #1058?
Regarding groups for each display option, I'm not sure what works best for screenreader users.
I'm testing with VoiceOver on macOS, which indicates that I am entering and exiting the group, and for the individual panels only reads their heading. I feel like that is enough? But I wouldn't mind trying what you suggested - could you maybe include that in your PR as well?

geichelberger added a commit to geichelberger/tobira that referenced this pull request Jan 16, 2024
As discussed in PR elan-ev#1021 this is a
PoC to test screenreader output with individual groups.
owi92 added a commit that referenced this pull request Jan 16, 2024
As discussed in PR #1021 this is a
PoC to test screenreader output with individual groups.
@owi92 owi92 deleted the edit-series-ux branch March 4, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:user User facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify add/edit series block menu
3 participants