- Issue created by @swirt
- @swirt opened merge request.
- Status changed to Needs review
over 1 year ago 2:55am 1 April 2023 - ๐บ๐ธUnited States swirt Florida
Uploaded a patch file in case anyone needs an immutable version.
The last submitted patch, 4: 3351638-4.patch, failed testing. View results โ
- Status changed to Needs work
over 1 year ago 2:57pm 3 April 2023 - ๐บ๐ธUnited States swirt Florida
I am working on fixing the test failures.
I did some digging into the history and found that this truncation came from this issue https://www.drupal.org/project/drupal/issues/86461 ๐ Truncate long paths and path aliases on admin/build/path Fixed which arbitrarily picked 50 characters for the truncation by the first person attempting to patch it.
There was no discussion as to how useless this would render the UI and no discussion of alternative like CSS to solve the problem instead of hiding the relevant data completely. The issue itself did suggest truncation OR wrapping but it was never discussed and truncation was the first patch that came in.
- @swirt opened merge request.
- Status changed to Needs review
over 1 year ago 3:15pm 3 April 2023 - ๐บ๐ธUnited States swirt Florida
This patch adjust the test to not look for truncation.
- ๐บ๐ธUnited States skyriter
I tested this, and it's working in my environment.
- Status changed to RTBC
over 1 year ago 1:44pm 4 April 2023 - ๐บ๐ธUnited States smustgrave
Can see the problem with not being able to see the URLs
I don't think it should be an issue to remove.
Updated IS with the solution that was chosen.
- ๐บ๐ธUnited States swirt Florida
Thank you @skywriter and @smustgrave
Just to be sure that this patch does not make a breaking change, I created a 255 char long alias. It displays just fine in the list of aliases
- Status changed to Needs review
over 1 year ago 11:55pm 4 April 2023 - ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
So with some git archaeology ๐ค I traced this back to ๐ Truncate long paths and path aliases on admin/build/path Fixed - yes a 5 digit NID from 11 years ago where we made this change intentionally.
So now we're directly reversing that.
The motivation given there was 'it looks bad and can break template layout'
I think we should put this to the usability team to decide if the decision we made 11 years ago was the wrong one or not.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Crediting myself as the git archaeology required going back to before we even had controllers.
- ๐บ๐ธUnited States swirt Florida
Thanks @larowlan. Glad to see you came to the same archeological roots that I called out in comment #6.
That issue made a lot of reference to the method of truncation and what tests were needed, but little was done to address concerns like
@David_Rothstein : but can someone clarify why we are choosing 50 characters as the number to truncate at? That seems like an awfully small number.
That went unanswered and the 50 count just came from the original patch in the thread.
Until @Poker_10 commented a decade later3. Reopen this for D9 to change the truncated length from 50 characters to another number
The problem is, the purpose of the Alias UI is to help you manage aliases. By truncating them to any level, we get in the way that purpose. In its current state, managing the aliases is like a child's game of memory.
Which of the 27 aliases that all look identical is the one I really want?
Click.
Not that one.
Click.
Not that one either.
Click.
Nope.
{frustration builds}
Click.
Yay, I finally found the right one.The way I read the thread of the original issue, the usability of the page was never considered, or at least not discussed. We took a usable interface and made it less useful but slightly more pretty.
I also think there are Accessibility concerns introduced in the original issue too because the link title was made the same as the next column (the system path). So anyone using screen readers is presented with not enough information (due to the truncation) and they also get to hear the system path read twice back to back.
Listen to it with a screen reader, it is annoying.That is not to say that this issue does not need usability review. I agree that it does and by essentially rolling back #86461 we are undoing the usability review that was never done on that issue.
- ๐จ๐ฆCanada mgifford Ottawa, Ontario
Interesting to see that the original issue ๐ Truncate long paths and path aliases on admin/build/path Fixed was started in 2006, before the iPhone was released. The goal at the time was "When working with small-width templates, the long paths can destroy the nice look/layout of the template." Thanks for doing the research on this @swirt & @larowlan.
This does look like an accessibility problem currently. I haven't looked at the source code of this in a long time, however taking away the truncation and providing the whole link should resolve the accessibility problems with these links.
- ๐บ๐ธUnited States swirt Florida
Sample html without truncation
<td><a href="/2021-post-911-gi-bill-chapter-33-rates" title="/node/39676">/2021-post-911-gi-bill-chapter-33-rates</a></td> <td><a href="/2021-post-911-gi-bill-chapter-33-rates" title="/node/39676">/node/39676</a></td>
- ๐บ๐ธUnited States maggiewachs
+1 for removing the title attribute that was added for the purpose of showing the full path. Titles are best suited for situations where link text isn't available. In this case, the full text should be linked, making the title attribute redundant (and possibly noisy for screen readers).
- ๐บ๐ธUnited States swirt Florida
Based on what maggiewachs has identified, it sounds like we should be doing this
<td><a href="/2021-post-911-gi-bill-chapter-33-rates">/2021-post-911-gi-bill-chapter-33-rates</a></td> <td><a href="/node/39676">/node/39676</a></td>
This includes:
- Removing the title attributes from both alias link and system path link.
- Making the system href use the system path rather than the alias.*
* Yes this system path should lead to the alias version via a rewrite but sometimes there are redirects that interfere so this allows testing that in the UI.
- ๐บ๐ธUnited States swirt Florida
Here is an immutable patch file from the PR.
- ๐บ๐ธUnited States swirt Florida
Proof of life
<tr class="odd"> <td><a href="/2021-post-911-gi-bill-chapter-33-rates">/2021-post-911-gi-bill-chapter-33-rates</a></td> <td><a href="/node/39676">/node/39676</a></td> <td class="priority-medium">English</td> <td> <div class="dropbutton-wrapper"><div class="dropbutton-widget"> ... removed from this paste ... </div></div></td> </tr>
Example of untruncated output.
And here is the same output on a much narrower screen
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Removing my credit because I missed the comment in #6
@swirt could you reformat your link using the
[#nid]
format so it gets updated to emit the title?Sounds like we have broad buy in here, next step is to visit the #ux channel in Slack and put this in the bot generated agenda reminder so the kind folks there can look at it in their next meeting. Before doing so, making sure we have before and after shots in the issue summary
Moving to 10.1.x as we don't commit tasks to 9.5.x
If you could make the argument that this is a bug it would be eligible to backport
- ๐บ๐ธUnited States swirt Florida
Thanks @larowlan.
Crediting @larawlan because he gave great guidance on how to move this along. ;)
Added before and after screen caps to original.
Posted in the #UX channel.
I would call it a "Bug" because the Alias UI is intended to make make it possible to manage aliases effectively, and when we can't see the alias variations in a meaningful way, it prevents me from doing what I need to do.
- ๐บ๐ธUnited States swirt Florida
This was presented at the ๐ Drupal Usability Meeting 2023-04-07 Fixed
- ๐บ๐ธUnited States swirt Florida
Discussion on the call touched on whether this was fixing a bug, or just an improvement.
There was agreement that it borders on these bug criteria- Incorrect or misleading user interface text. - This is considered because the system path link was href to the alias and not the system path.
- Usability issues that prevent people from using functionality (as if it didn't work at all). - Not fully useless as there is a workaround for sighted users by hovering over the truncated alias and have the browser surface the actual destination.
- Accessibility issues that prevent people from using functionality (as if it didn't work at all) - screen readers would not reveal the destination of the url so non-sighted users could not detect the actual alias by hovering over the truncated link.
- Status changed to RTBC
over 1 year ago 6:34pm 7 April 2023 - ๐บ๐ธUnited States smustgrave
Changing to a bug per #34
Sounds like from the UX meeting there is nothing that needs to be fixed. Think this is good for committer review.
- ๐บ๐ธUnited States skyriter
I just tested the patch in our PR environment. The URLs are no longer truncated and are thus visually distinguishable from each other.
- ๐บ๐ธUnited States swirt Florida
Thank you both for reviewing and testing.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
+++ b/core/modules/path/src/PathAliasListBuilder.php @@ -170,10 +170,13 @@ public function buildRow(EntityInterface $entity) { + // We want the unaliased system path. + $system_url = Url::fromUri("base:{$path}"); $row['data']['path']['data'] = [ '#type' => 'link', '#title' => $path, - '#url' => $path, + '#url' => $system_url,
Why was this change needed?
- ๐บ๐ธUnited States swirt Florida
There were two reasons for this.
1. Having two visually different links that were the same links in adjacent columns was misleading especially to visually impaired since the links sound like different urls but are in fact the same. (An accessibility concern)2. There are time when a system link does not end up resolving to it's alias due to a redirect or some other rewiring. This allows the ability to verify where the actual system link resolves
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Should we move those changes to a different issue to have a separate discussion?
- ๐บ๐ธUnited States swirt Florida
@larowlan That aspect was discussed specifically on the Drupal Usability Meeting
Incorrect or misleading user interface text. - This is considered because the system path link was href to the alias and not the system path.
It received positive review from all in attendance. I tried to reference the meeting transcript or the recording but they have not been added yet #3350284
My vote would be not to separate it out as then this UI will still have have a significant accessibility issue.
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Ok, I'll wait for the recording and watch that - thanks
- last update
over 1 year ago 30,320 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - last update
over 1 year ago 30,322 pass - Open on Drupal.org โEnvironment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 30,330 pass - last update
over 1 year ago 30,330 pass - ๐ธ๐ฐSlovakia poker10
@larowlan Seems like the Drupal Usability Meeting recording was published today.
- last update
over 1 year ago 30,330 pass - last update
over 1 year ago 30,330 pass - last update
over 1 year ago 30,334 pass - last update
over 1 year ago 30,334 pass - last update
over 1 year ago 30,334 pass - last update
over 1 year ago 30,334 pass - last update
over 1 year ago 30,334 pass - Status changed to Needs work
over 1 year ago 1:22pm 22 May 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Due to the scope expansion that @larowlan identified in #39, one of the following changes needs to happen for this to be committable:
- Update the issue summary so the issue scope includes the additional changes as mentioned in #39. Much of this can probably repurpose the motivations explained in #42. Note that I personally would not commit this version as I feel they are unrelated issues that happen to be in close proximity. I'd also be fine if another committer was OK with the expanded scope.
- Remove the changes pointed out in #39 and open a followup. This is my preference as it contains the issue scope so the commit-worthiness is clear and basically an unqualified improvement.
And I hope this additional process isn't too annoying. The rationale for the additional changes is good ones and I'd like to see those changes. The benefits to containing the scope of an issue are less immediate, but become more apparent later. For example, if accessibility concerns are brought up and someone demands a revert (this happens enough that it's example-worthy), we wind up losing the no-truncation benefit due to concerns that are unrelated to it.
- ๐บ๐ธUnited States swirt Florida
Sounds good. I created #3362007 and will break up this patch into two patches.
- Open on Drupal.org โEnvironment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org โEnvironment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 1:09am 23 May 2023 Drupal core is moving towards using a โmainโ branch. As an interim step, a new 11.x branch has been opened โ , as Drupal.org infrastructure cannot currently fully support a branch named
main
. New developments and disruptive changes should now be targeted for the11.x
branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule โ and the Allowed changes during the Drupal core release cycle โ .- ๐บ๐ธUnited States swirt Florida
I updated the MR to remove the use of the actual system path. The system path is back the way it was, now only with the truncation removed.
- Open on Drupal.org โEnvironment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to RTBC
over 1 year ago 3:09pm 23 May 2023 - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Thanks for the flexibility @swirt, this looks ready to me.
For additional assurance this is a good idea, I messed with this at different widths and when the viewport is narrow enough to cause unwanted vertical scrolling, the experience really isn't improved with the truncation. Perhaps slightly less horizontal scrolling is needed, but it is still needed. That's a larger problem to be addressed in #3068696: Tables overflow on mobile โ
- last update
over 1 year ago 29,395 pass - last update
over 1 year ago 29,399 pass - last update
over 1 year ago 29,399 pass - last update
over 1 year ago 29,400 pass - last update
over 1 year ago 29,409 pass - last update
over 1 year ago 29,409 pass - last update
over 1 year ago 29,415 pass - last update
over 1 year ago 29,420 pass - last update
over 1 year ago 29,420 pass - last update
over 1 year ago 29,425 pass - last update
over 1 year ago 29,429 pass - last update
over 1 year ago 29,430 pass - First commit to issue fork.
- last update
over 1 year ago 29,429 pass, 2 fail - last update
over 1 year ago 29,429 pass, 1 fail - last update
over 1 year ago 29,430 pass -
lauriii โ
committed 9daaabee on 11.x
Issue #3351638 by swirt, lauriii, larowlan, mgifford, bnjmnm, smustgrave...
-
lauriii โ
committed 9daaabee on 11.x
-
lauriii โ
committed 2368fcf9 on 10.1.x
Issue #3351638 by swirt, lauriii, larowlan, mgifford, bnjmnm, smustgrave...
-
lauriii โ
committed 2368fcf9 on 10.1.x
- Status changed to Fixed
over 1 year ago 11:03am 19 June 2023 - ๐ซ๐ฎFinland lauriii Finland
Decided to backport to 10.1.x with a +1 from @longwave.
Automatically closed - issue fixed for 2 weeks with no activity.