class Primer::Beta::NavList

def before_render

def before_render
  if heading?
    raise ArgumentError, "Please don't set an aria-label if a heading is provided" if aria(:label, @system_arguments)
    @system_arguments[:aria] = merge_aria(
      @system_arguments,
      { aria: { labelledby: heading.id } }
    )
  else
    raise ArgumentError, "When no heading is provided, an aria-label must be given" unless aria(:label, @system_arguments)
  end
end