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

Fix #2734 by Setting List Metadata applyListStyleFromLevel: true when toggling a list #2743

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

BryanValverdeU
Copy link
Contributor

This will fix #2734.

Right now, we do not set metadata when toggling a numbering or bullet list.
This causes getListAnnounceData to return undefined, so when using Enter on a List we do not announce anything.

To fix, always set the applyListStyleFromLevel metadata so we announce the new list item marker.

To test:

  1. Start Narrator
  2. Toggle List item using buttons in ribbon
  3. Add text to first item
  4. Press enter to create a new list item

Before
No announcing of the new list item

After
We announce the new list item marker.

if (level) {
updateListMetadata(level, metadata =>
Object.assign({}, metadata, {
applyListStyleFromLevel: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

besides here, when do we set this metadata to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other place we set this metadata is when indenting a List. In setModelIndentation.ts

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I tested, and I did not find any regressions.

if (level) {
updateListMetadata(level, metadata =>
Object.assign({}, metadata, {
applyListStyleFromLevel: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I tested, and I did not find any regressions.

@BryanValverdeU
Copy link
Contributor Author

This will also fix #2735

@BryanValverdeU BryanValverdeU merged commit 5e2b680 into master Jul 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants