You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing, I noticed some weird spacing in the A11y View, so I inspected the HTML for the keyboard shortcuts dialog. Screen shot from inspector
A div element cannot be direct child of an ul element
It is ok if div elements contain things that need to stick together in the PDOM. It's important that they do not come between natural parent and child elements.
The lists in the Keyboard Shortcuts dialog should be like this:
<h2>Move or Jump Grabbed Balloon</h2><ul><li>Move grabbed balloon up, left, down, or right with Arrow keys or with letter keys W, A, S, or D.</li><li>Move slower with shift plus Arrow keys or Shift plus letter keys W, A, S, or D.</li><li>Jump close to sweater with J plus S.</li><li>Jump to wall with J plus W.</li><li>Jump to near wall with J plus N.</li><li>Jump to center with J plus C.</li></ul>
Here's the ideal fix:
The API should require that an li element is required to be a direct child of its parent ul
Use the li tag itself to wrap the content of the list item, rather than adding an extra p tag.
If you must use a p tag, it needs to go inside the li.
Same for the div elements. If possible, do not add extra divs. If not possible, the div and/or the p have to be inside the li.
If the purpose of the div is to "keep related content together for placing in the PDOM", it would be better to contain the parent ul, or contain the parent ul together with its labeling heading than to contain individual list items.
Additionally, removing the p should improvement the visual layout of the the bulleted lists in the A11y View:
The text was updated successfully, but these errors were encountered:
Thanks @terracoda, I shouldn't need a full example, I think you already provided one earlier. This is caused by recent changes to the API, and usages of the API in the sim haven't been updated. Early versions of BASE did not have this problem.
While testing, I noticed some weird spacing in the A11y View, so I inspected the HTML for the keyboard shortcuts dialog.
Screen shot from inspector
A
div
element cannot be direct child of anul
elementIt is ok if
div
elements contain things that need to stick together in the PDOM. It's important that they do not come between natural parent and child elements.The lists in the Keyboard Shortcuts dialog should be like this:
Here's the ideal fix:
li
element is required to be a direct child of its parentul
li
tag itself to wrap the content of the list item, rather than adding an extrap
tag.p
tag, it needs to go inside theli
.div
elements. If possible, do not add extradiv
s. If not possible, thediv
and/or thep
have to be inside theli
.div
is to "keep related content together for placing in the PDOM", it would be better to contain the parentul
, or contain the parentul
together with its labeling heading than to contain individual list items.Additionally, removing the
p
should improvement the visual layout of the the bulleted lists in the A11y View:The text was updated successfully, but these errors were encountered: