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.
Using Page Manager today I couldn't find a way to reorder panels within a region using the keyboard alone (no pointing device). I'm hoping that I'm just missing something. If not, would it be possible to expose a 'weight' for each panel through the settings UI?
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedHm, yeah. I think about this problem every now and then, and I don't have a good solution. There are two pieces of data. There is the 'region' a pane belongs in, and the 'position' which is kind of a slot the pane goes in. It doesn't really use weights the way tabledrag does, and there aren't currently invisible form elements.
What it uses behind the scene is a hidden field per region that controls the order of panes using their pane id.
I wonder how feasible it would be to have a hidden "move" button that only a screen reader would seen; when "clicked" this button could bring up a small form, with a select widget for the region to move to, and a responsive widget that gives the position. One problem is that in many layouts, regions may not be clearly named. In all the stock layouts they're pretty easy, things like top, left, right, bottom, bottom middle. I'm not sure how that actually works out when you have no way to visualize positioning, though.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedAlso actually Panels.
Comment #3
Rory CreditAttribution: Rory commentedI'm not someone who uses a screen reader, but something that would make repeated sense to me (and probably others internationally) would be the arbitrary reading of an element's x and y co-ordinates on the page.
Not sure if javascript would be necessary to address this issue (as I don't know enough behind the scenes about Panels or CTools yet) but I looked up getting an object's cumulative position on the page and it sounds like element.offsetParent and element.getBoundingClientRect() might be a cross-compatible place to wreak some havoc:
https://developer.mozilla.org/en/DOM/element.getBoundingClientRect
Comment #4
mgiffordtagging.