Closed paulrobertlloyd closed 3 years ago
D'oh, this is a bug purely caused by the poor ordering of the arguments in that tag.div
call.
Once #110 has been released you'll be able to set the role via the html_attributes
, so something like:
render GovukComponent::NotificationBanner.new(title: "omg", html_attributes: { role: "marquee" })
Amazing turnaround! A++++, will file bugs again 😉 Thanks @peteryates!
I’m looking to use the new notification component, and show a success message after a user has successful completed a task. The design system, says this:
However, as far as I can tell, this value is hard coded to
region
: https://github.com/DFE-Digital/govuk-components/blob/e963f4749572f6ae8668adcc64b3db24e6f92f50/app/components/govuk_component/notification_banner.html.erb#L1Have I understood this correctly? Does this advice also not conflict somewhat with the
disable_auto_focus
option? (I’m not sure ifrole="alert"
should always mean attracting focus on page load, but this seems reasonable).