net - UK (2020-05)

(Antfer) #1
This element should contain a list of
different actions that a user can perform.
For example, this would be used when
selecting paint brushes in a painting
application. Think of this as the interactive
equivalent to the <ul> element.
Previously, the type attribute would affect how the
menu behaves. The context type would have enabled
items to be added to the context – or ‘right-click’


  • menu, but this has since been removed from the
    specification. Right now, the default and only type
    available is toolbar, which is used to display these
    elements on screen.
    By default, this element has no styling and is used
    purely to provide meaning to the set of actions.
    Currently, only Firefox respects its semantics, but
    there is no harm adding this element now for when
    there is wider support.


<menu>
<li><button>Round</button></li>
<li><button>Flat</button></li>
<li><button>Fan</button></li>
</menu>

When displaying changes to a block of text,
it can be useful to be able to visually see
what changed.
The <del> element shows what was
removed and <ins> what replaced it. Both can
have cite and datetime attributes, which define why
and when this change occurred.

Despite the constant negative press <del>covfefe</
del><ins>coverage</ins>

Bitbucket uses
<del> and <ins> to
display what code
has changed in each
commit

BBC News uses
an off-screen
description to tell
screenreaders that
do not support
<figcaption> about
its role

Blocks of text can often have content such as a
diagram, chart or image referenced within it. While
it may be related, it’s not required to understand
the context. For this sort of content, the


element is the perfect choice.
As a rule of thumb, any related content that could be self-
contained are good candidates as they can be consumed
separately from the main document flow. They will likely be
referenced by a number in a larger block of text.
A
element can be used to provide a description
to the contents. Using this provides a semantic link and
makes sure that the description does not form part of the
figure itself.
If the content is tangentially related to the main
document, such as a pullquote, then an
Free download pdf