-
Notifications
You must be signed in to change notification settings - Fork 40
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
Move title of confirm form to a backdrop message #6733
Move title of confirm form to a backdrop message #6733
Comments
This is fantastic. Looks good, much better. PR works and the code is a one line change. Now, what bad things can happen? I don't know. |
The PR also fixes the issue for the demo module, backdrop-contrib/demo#32. It will change behaviour contrib modules are used to and may be a problem? Or may be an overall improvement? |
This issue may be really ancient and extends back to Drupal 7. If you go to a Drupal 7 site with something like the backup_migrate module, look at saved backups and go to delete one. The confirm question |
Maybe, this can qualify as a bug fix? |
I'm not really sure, whether this change isn't an A11Y regression. Instead of providing the info in the page title AND the meta title for quick access, it's now just some text somewhere on the page. And the page title is the generic title of the content or item we're about to delete. No A11Y expert, though. At the very minimum I'd expect the title to be something like "Confirm to delete [title of item]". Not sure if that would be sufficient. |
What I find more confusing on these screenshots is the fact the tab/sub-tab is still showed as active. When I deleted a node, the title is changed, but none of the visible tabs is shown as active. Should not what done by Backdrop core when deleting a node be always done when a confirmation page is shown? |
When deleting a view from the page showing all the existing views, the tabs disappear. They disappear because the page changes from Even in this case, the title change is not confusing, since the page is clearly another one. |
@avpaderno is this something directly related to the change proposed here, or an independent (new) topic? |
What @avpaderno is talking about has nothing to do with the changed proposed here. I just changed one backdrop_set_title() for a backdrop_set_message(). Tab functionality has not been changed. |
I am talking of the screenshots shown right after Proposed solution and in another comment (which shows the before-and-after changes), so yes, it is related to the change proposed here. I am wondering if this is an issue with a contributed module because, as I shown in the screenshots attached to my previous comments, there is no issue with Backdrop core and the fact the page title is changed. |
@avpaderno, yes, this is just how those contrib modules handle those tabs. Core's behavior is as you have shown, but again, this PR has nothing to do with how core or contrib modules handle the tabs, even I used them to explain the problem. However, I got the point that I have to take a wider look at this issue, also, as @indigoxela pointed out, from an A11Y perspective. I agree that having just the same title is not clear enough. I'll try your suggestion of changing the title and printing the warning message as well. |
Oh yes, better. Of course, loads and loads of functional tests are failing, as they expect a different string for their checks. 😉 But let's see what people think re this UI change. Personally, I find this is an improvement, but I'm no UX specialist. |
Fixed coding standards and failing tests |
The issue is exactly how that contributed module handles tabs. It shows a confirmation form on the already rendered tab; that is why the page title changes. It would not happen if the confirmation form would be rendered on a different page, which is what Backdrop core does with With the provided PR, I prefer how Backdrop renders |
good point, @argiepiano, I agree. Let's find a different approach. The simplest solution would be to set a fixed, agnostic of context, title, but very clear about what we are doing: No need of PR fixed with this approach. |
OK, this is better, but keep in mind that system messages may be shown in a different spot of the layout (or even as a modal window that disappears after a certain amount of time, as is the case with some themes). So, we can't trust that the warning will always be shown in the "right" spot (below the title and above the button). This may confuse the user. I feel like a system warning should not be used in this case - AFAIK system warnings are rarely used to prompt the user for some action (i.e. confirm something by clicking a button) - they are informational messages that are the results of an action. Curious to hear others' feedback. |
Another good point, @argiepiano, I agree. But I'll fix this ;-) These are not system messages. Note that there is no cross to close them in the upper right corner. They are form elements with prefix to shows as warning message and will not disappear: Just pushed a commit with this fix. |
I like the sentiment here, but would really prefer to have the confirmations thrown by The good thing with such a solution is that users are not "redirected" somewhere else - they are kept within the same context of what they were doing. |
This sounds a better solution, indeed. |
Description of the need
I always found strange that the confirm form function sets the title of the page. This issue made me think about a practical solution to override this functionality. However, I would say it would be much better to change core.
Proposed solution
This is what happens now. The demonstration contrib module uses tabs:
These two tabs show the title normally, but the third one is a confirm form:
and the title gets changed. Of course, you can still see the context in the breadcrumb, but what happens if you don't use the breadcrumb? Context indeed gets lost.
Wouldn't it be much nicer this?:
Alternatives that have been considered
I don't see an easy way to accomplish this functionality by altering code with a contrib module.
Additional information
I will provide a PR
Draft of feature description for Press Release (1 paragraph at most)
Confirm forms now show the title as a warning backdrop message.
The text was updated successfully, but these errors were encountered: