Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We are still using old CSS class names in Drupal 8:
$ git grep -n "element-invisible"
core/modules/views_ui/js/views-admin.js:562: this.operator.find('label').add('div.description').addClass('element-invisible');
$ git grep -n "element-hidden"
core/modules/ckeditor/src/Plugin/Editor/CKEditor.php:218: '#markup' => '<div id="ckeditor-hidden" class="element-hidden"></div>',
core/modules/quickedit/js/quickedit.js:408: var $el = $('<div id="' + id + '" class="element-hidden"></div>').appendTo('body');
element-hidden and element-invisible no longer exist in Drupal, they have been simplified, see this change notice.
Proposed resolution
Rename them:
element-hidden -> hidden
element-invisible -> visually-hidden
Remaining tasks
patch
User interface changes
none
API changes
none
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal8-Update-element-invisible-and-element-hidden-1.patch | 2.07 KB | er.pushpinderrana |
Comments
Comment #1
scor CreditAttribution: scor commentedComment #2
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedPlease review attached patch.
Comment #3
cwoky CreditAttribution: cwoky commentedThe patch works fine.
Comment #4
Elijah LynnI reviewed this patch yesterday and it applies fine but I was having trouble finding out a way to test that the HTML output actually appeared on the pages. But logically it looks like it should work.
Comment #5
Elijah LynnIn order to test for the views-admin.js you need to add a new filter, then rearrange the filters and click "Create new filter group". But, it is currently broken and doesn't work. There is an issue open to fix it here.
#2168893: Views filters groups adding and removing is broken
Comment #6
webchickNice catch.
Committed and pushed to 8.x. Thanks!
Comment #8
mparker17Woot!
Comment #10
mgifford