-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
I noticed the following. Focus styles should be pink. The Related images section covers the popover. The idea of the character counter was to limit the message length by showing the remaining characters until reaching zero. However, I do not know what is a reasonable character limit for a message like this. I forgot the mention and design that placeholder text should be I am seeing the close button slightly bigger. It should be the I also noticed other minor details on the "report content" action, but I did not add them as not sure whether those belong to the component or not. |
@panchovm
|
Cleaned up the Git history. |
This seems reasonable to me. I also think a character count is less confusing than a count-down from the limit in my experience. If we wanted to display the limit we could do something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is SUCH a welcome clean up of this component. It's amazing how much easier it is to use the form and the code is looking really clean and easy to follow now. Massive kudos to that!
However, I think we need some input from @panchovm on this component's usability, in particular whether a popover is really the best solution for this problem.
There are three issues I see with the popover being used for this:
- When selecting one of the two options that increase the height of the popover (DMCA and Other), the popover becomes too tall to fit on a reasonably sized screen. You can see this problem present on my own massive 16 inch Macbook Pro screen (though admittedly I have my UI scaled up, to help my eyes, I think this will effect 13 inch and smaller screen users which are more common than the larger screen sizes).
Gravacao.de.Tela.2022-02-04.as.06.54.28.mov
This could be helped if we made the popover content wider, but could still cause problems for smaller screen sizes, especially because the popper positioning will default to rendering above the disclosure in many cases, but then be covered by the header.
- We should consider whether this is a good use case for the popover component. A couple of reasons for this come to mind:
2a. We are settinghideOnClickOutside
to false. To me this probably communicates a sense that the form is currently "too small" and easy to accidentally click outside of it and ruin your progress in filling it out.
2b. The form, when open, especially on a small scree, dominates the screen and because of 2a and the current behavior of the "Cancel" button, is slightly difficult/unintuitive to quickly close it if opened by mistake or curiosity.
2c. We are running into various positioning issues already, even on a full-sized laptop screen.
These problems make me wonder whether we should use a dialog-style modal for this form instead. It would largely appear the same as the popover, but have its own independent scrolling, and receive focus from the page by intentionally hiding the rest of the page behind it and a modal backdrop. The current modal component would need some modifications as it's currently optimized for the single-result page design and not a more condensed "true dialog" type of interaction that this form would require... namely tighter horizontal margins.
- We need to fix the z-index of the Popover content relative to the header. Popovers should appear above everything, always, period, so we might as well throw a custom z-index class on it for something absurdly high like
z-9999
and call it a day. If we keep this form inside a popover, this change will block this PR. Otherwise we can open a separate issue for it.
I think I would like to propose keeping this in a popover for now, but opening an issue for @panchovm to rethink this as a modal or some other experience that would be more intuitive, easier to use, and not have the current positioning and size problems that are present with the popover.
However, this PR does introduce some significant quality of life improvements for this form and does not cause new issues (aside from the z-index issue which must be addressed for popovers one way or another). We should also widen the form to make it more easily fit onto average sized screens.
I do also want to reiterate that this PR is really good work and unequivocally improves the popover version of the form in many important respects. 🚀
|
||
<style scoped> | ||
.report-button { | ||
@apply px-0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the goal for removing this? It makes the focus ring really "tight" around the text and the icon 🙁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
@panchovm how would you like these cases handled? Perhaps we shouldn't use a focus outline in these cases? We could translate the button horizontally to align it with the end rule of the page but that could cause unwanted horizontal scrolling in narrower screens if we're not careful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's how it currently is. The focus outline appears a little closer to the text, but brings the button closer to the right edge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, if it's fine for the focus-outline to hug the text like that then disregard this comment 🙂
src/components/VRadio/VRadio.vue
Outdated
focusable="false" | ||
width="20" | ||
height="20" | ||
role="img" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
focusable="false"
and role="img"
seem kind of contradictory to me. Shouldn't we use role="presentation"
if it's something screen readers can safely ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh I copied this bit from VCheckbox
. Since the preceding input
is fairly accessible to screenreaders, should we go one step further and aria-hidden
this SVG entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to set aria-hidden
to both the radiomark and the checkbox checkmark.
Absolutely. That is way better. I thought we set a minor character limit, and showing a counting-down element as Twitter does-ish sounded good to me. Now I think it's not very useful and I would eliminate it, the disabled button changes to be enabled once reaching the 20 characters and that style change looks sufficient. |
To @sarayourfriend's points. 1. Height changeYou are right about the height change concern on screen sizes. It feels clumsy when jumping between options. The reason behind this solution was having a single step for reporting. The previous feels odd when seeing a description step after selecting an option. But now, I am thinking of a different solution that keeps the description part (text-area component) optional for some choices and visible all the time. I can work on this soon. 2. Modal over modal on desktopWhen designing this, I thought the same, and my conclusion was that having a modal over another modal can become tricky in the long run. My approach was having popovers on desktop and modals on mobile, but you are right about the attention we are putting into this flow compared to other info pieces. I want to dive deeper into this and come up with an idea to solve this and other content interactions. But supporting your message by saying that this work is an improvement of the existing one, and we should keep it until finding another solution where we all agree upon. |
Regarding the width: It's not a blocking suggestion. It also needs to be done careful with consideration for narrow mobile screens. The current version fixes worse problems from the original, so I think the width we can consider during the next design iteration of this rather than stalling this PR. There's a couple accessibility issues I've found as well, but I think these are present in the existing popover so we can open a seperate issue to address them. But first, some blocking accessibility issues that introduce regressions from the existing form:
Non-blocking but needs to be addressed ASAP:
@panchovm Instead of showing the new text box and DMCA notice inline inside the radio group, I think it would do to show each conditionally after the radio group, between the reason choices and the close/submit button. This way when someone chooses a particular reason, the next item on the page that will be focusable is the explanation or text box for them to fill out. I have to say I think this pattern is very difficult from an accessibility perspective. It's not impossible to use but without visual context there's a lot that will be missing. From a keyboard accessibility perspective for sighted users I think it's working well already. But screen reader users who cannot rely on visual context will probably find this difficult and confusing. When it comes to the ARIA properties of the checkbox, I think you're doing fine. We're using native input elements so there's not too much to be concerned about. There are some difficulties I found using VoiceOver where it wouldn't read the label of the first option when it is intially focused when the popover is opened, but this would be fixed by switching the initial focus element of the popover to be the first paragraph of text in the popover rather than letting it use the default of the first tabbable element in the popover. |
I'm noticing a quirk where when the popover is open there are double scrollbars on the page. This has to do with the way we're handling the page layout with grid and can be fixed by adding the |
I was testing @sarayourfriend's idea and it looks good as a temporary solution for the focus navigation order and the height change. I set a fixed height no matter the option selected and added an optional field for the mature content reason. It looks like this.
This idea aligns with the exploration I started for the modal/non-modal version I would like to drop in the following weeks and discuss the best long-term implementation. |
@zackkrida I tried a few times (in different browsers) but I'm not seeing two scrollbars, can you share the steps to reproduce? |
@dhruvkb I see them when the popover hangs beyond the bottom edge of the screen: This is probably a bug with the popover component rather than this usage of it though. |
@dhruvkb can we mvoe the close button to be before the popover content in the DOM order? Currently "shift + tab" from the radio options focuses the disclosure rather than the close button. Not a blocker though. |
The fixed height design looks good @panchovm and the implemenation seems to work really well at first glance @dhruvkb. I'm logging off for the day but I will review this with some screen readers tomorrow morning first thing to verify that it is good to go. My guess is that this is going to be an even bigger improvement over the existing implementation than it already was going to be. Really nice work! |
I believe this is intentional after setting Isn't there also some way to use |
@sarayourfriend yes! The |
I tested this in Firefox on mobile, and the report form looks and works really great, no problems with z-indexes or not fitting into the screen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A massive improvement over what we have now, and nice code style details such as frozen object as statuses.
src/components/VRadio/VRadio.vue
Outdated
focusable="false" | ||
width="20" | ||
height="20" | ||
role="img" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to set aria-hidden
to both the radiomark and the checkbox checkmark.
Oof, that's not a good user experience on mobile! I suspect it's just easier than building the form ourselves and also easier for whomever is taking action on the reports... though Django Admin really makes that part easy for us to remedy as long as we build the front-end for the reporting form. In the mean time, while the Google form is still with us, we could use the strategy in this article to pre-fill the search form: https://www.labnol.org/prefilled-google-forms-200601 Definitely a separate ticket for that one though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From an accessibility perspective this is working really well now. Kudos to @dhruvkb and @panchovm for adapting the requirements of the form and the design of it to be accessible!
Just one last, non-blocking suggestion from my perspective about the placeholder and minlength. If folks disagree with that suggestion then it's fine to merge. I'm also fine if we just create another issue to refine the placeholder text.
Fixes
Fixes #543 by @panchovm
Follows up hotfix PR #719 addressing issue #713
Completes a pending TODO in #682 by @krysal
Description
This PR updates the content report flow to match the new mockups using the new components.
Testing Instructions
In the Storybook:
VContentReportPopover
story.On the actual frontend:
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin