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

Show other authors editing the same element #13420

Merged

Conversation

brandonkelly
Copy link
Member

@brandonkelly brandonkelly commented Jul 13, 2023

Description

Updates full-page element editors to show other authors who are currently viewing/editing the same element.

User photos displayed at the top of an entry

The user photos have tooltips that explain what they were doing, e.g. “Crystal is viewing this entry.” or “Travis saved this entry at 10:35 AM.”

A tooltip stating that “Crystal is viewing this entry”

Additionally, full-page element editors now track whether the element being edited has been changed externally, either directly or upstream, and will start displaying a “This entry has been updated.” notice when that happens, with a “Reload” button.

A notification that says “This entry has been updated.”

Related issues

@brandonkelly brandonkelly requested a review from a team as a code owner July 13, 2023 05:25
@linear
Copy link

linear bot commented Jul 13, 2023

DEV-1154 Show other authors editing the same element

When editing an element, other authors’ activity for the element should be reported.

Copy link
Contributor

@gcamacho079 gcamacho079 left a comment

Choose a reason for hiding this comment

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

  • Keyboard users can’t currently access author information. Instead of a title tooltip, it's recommended a keyboard-accessible toggletip is used instead (such as the one introduced in Use inclusive toggletip guidance for InfoIcon.js #12272 ).
    In this case, a toggle button should be nested inside the list item, and should have an accessible name along the lines of "{{username}}, {{active/inactive}} author. More details."
  • All user images (SVG and user-uploaded) in the activity container the image can be considered decorative, since the accessible name should come from the toggletip button. You can hide both from the accessibility tree by setting role=" presentation" on the SVG and img.
  • For inactive users with no uploaded image, the color contrast of the user icon over its background (--gray-050) is 1.7:1. This should be modified to be at least 3:1.
  • The color contrast between active vs. inactive user icons (for users with no image uploaded to the CP) is 2:1. For users with a user image set, the change from inactive to active is a Use of Color issue, as the change of state is only communicated via a change in color.
    Although users can also get that info by viewing the toggletip, it may make sense to implement another visual cue for the author state. (An example of this is the dot indicator that shows on Spotify when shuffle is active.) This would improve the UX because users who aren't able to differentiate the contrast change between states won't have to open each toggletip to see who's actively editing the element.
  • When there are enough authors to overflow the container, the contents cause horizontal viewport scrolling. Instead, authors should wrap onto additional lines to prevent horizontal scrolling or overflowing authors should move into a disclosure menu. (Tested on 320px viewport by duplicating li elements.)
  • Part of a general notification issue, but when there's a notice with a focusable element inside, we should keep the notice open until the user dismisses it or focus leaves the container, even if the user has a shorter notice duration set. (After another author edited the element, I received the notification on Safari/VO, but the notification closed before the notification readout finished, so I was unable to hit the reload button.)
  • Screen reader users do not get the same information that sighted users do about author activity via visible changes to the author list. Changes to the author activity container (such as toggling the faded class, or another author viewing the entry) should be accompanied by announcements via a live region, such as "Another author is editing this entry" or "Another author is viewing this entry." Because it's a bit noisy with other updates happening on the page, and it's not a true "status" message, I'm removing this from the issue list.

@gcamacho079
Copy link
Contributor

@brandonkelly another issue I missed during the first run-through is that users should have the ability to pause/resume auto-updating regions to meet SC 2.2.2: Pause, Stop, Hide.

brandonkelly and others added 12 commits August 3, 2023 06:09
…he-same-element

# Conflicts:
#	src/config/app.php
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
#	src/web/assets/garnish/dist/garnish.js
#	src/web/assets/garnish/dist/garnish.js.map
…ement' into a11y/live-region-and-roles

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
…ement' into a11y/live-region-and-roles

# Conflicts:
#	src/web/assets/pluginstore/dist/css/app.css.map
#	src/web/assets/pluginstore/dist/js/app.js
#	src/web/assets/pluginstore/dist/js/app.js.map
…he-same-element

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
…ement' into a11y/live-region-and-roles

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
…cms/cms into a11y/live-region-and-roles

# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
@brandonkelly brandonkelly merged commit 82cec37 into 4.5 Aug 4, 2023
@brandonkelly brandonkelly deleted the feature/dev-1154-show-other-authors-editing-the-same-element branch August 4, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants