- Issue created by @juanolalla
- Status changed to Postponed: needs info
over 1 year ago 1:12pm 26 August 2023 This looks like a duplicate of π Cached forms can have duplicate HTML IDs, which disrupts accessible form labels Needs work . Can you confirm?
- πͺπΈSpain juanolalla
It is not a duplicate of that issue.
The scope of the referenced issue you are asking about, is to discuss and find a solution to replace Drupal's prevention of id collision, on all forms. There is a tough debate going on about cache invalidation for form IDs, and no consensus has been reached yet, leaving to a situation where this has been stuck for 11 years!
I have opened this issue specifically for the Search module, because here is where we are finding let's say 99% of the collisions, due to having a search block in every page is so common. So the goal of this issue is to provide a simple solution: change the ID just in this form. We have been forced to do that in alter hooks for 10+ years, so let's fix this now with specific IDs for the form Search module provides, while we keep the other issue open to continue discussing (it's been almost 1 year without movement there), and maybe one day we have a better cache solution or ID prevention globally.
- Status changed to Active
over 1 year ago 2:20pm 26 August 2023 - last update
over 1 year ago Custom Commands Failed - @juanolalla opened merge request.
- last update
over 1 year ago Build Successful - Status changed to Needs review
over 1 year ago 11:01am 14 September 2023 - Status changed to Needs work
over 1 year ago 1:52pm 14 September 2023 - πΊπΈUnited States smustgrave
Seems to have caused some nightwatch failures.
Also think we will need our test showing this issue.
- last update
over 1 year ago Build Successful - πͺπΈSpain juanolalla
It looks like the current solution is failing accessibility tests because when duplicating the block form on a page, elements get the same id. I've verified that Drupal's way of preventing duplicates id by adding dashes and numbers only works with "edit-keys" and "edit-submit", not other specific ids.
So we would need to add a different random hash / number to the id string.
- πΊπΈUnited States smustgrave
Curious does https://www.drupal.org/project/drupal/issues/2894747 π Views hardcodes exposed filter block form ID's which breaks AJAX when the same form is shown multiple times on one page Needs review solve this issue?
- πͺπΈSpain juanolalla
@smustgrave, no it doesn't look like it have anything to do with it.