[FIX] runbot_merge: dropdowns for bs5

BS5 namespaced the data-attributes it uses to trigger JS
behaviours. So for dropdowns `@data-toggle` doesn't do anything
anymore, one has to use `@data-bs-toggle`. Missed that while testing
the migrations.

Also seems like `@aria-expanded` was misapplied when I added the
dropdowns:

> When a menu is displayed, the button object that toggles the
> visibility of that menu has aria-expanded="true" set. When the menu
> is hidden, aria-expanded can be omitted. If specified when the menu
> is hidden, it should be set as aria-expanded="false".

Since the dropdowns are hidden by default, the button should be
`@aria-expanded="false"`.
This commit is contained in:
Xavier Morel 2024-12-02 08:14:20 +01:00
parent 876ec92059
commit 83e588d7fe

View File

@ -26,9 +26,9 @@
<div class="dropdown" t-if="staging.heads"> <div class="dropdown" t-if="staging.heads">
<button class="btn btn-link dropdown-toggle" <button class="btn btn-link dropdown-toggle"
type="button" type="button"
data-toggle="dropdown"
aria-haspopup="true" aria-haspopup="true"
aria-expanded="true" data-bs-toggle="dropdown"
aria-expanded="false"
t-attf-title="Staged at {{staging.staged_at}}Z for {{round(staging.staging_duration)}}s" t-attf-title="Staged at {{staging.staged_at}}Z for {{round(staging.staging_duration)}}s"
> >
<t t-out="0"/> <t t-out="0"/>
@ -286,9 +286,9 @@
<li class="dropdown" t-if="first_pr"> <li class="dropdown" t-if="first_pr">
<button class="btn btn-link dropdown-toggle" <button class="btn btn-link dropdown-toggle"
type="button" type="button"
data-toggle="dropdown"
aria-haspopup="true" aria-haspopup="true"
aria-expanded="true" data-bs-toggle="dropdown"
aria-expanded="false"
> >
<t t-esc="first_pr.label"/> <t t-esc="first_pr.label"/>
<span class="caret"></span> <span class="caret"></span>