setAttribute("aria-label", "x"), getAttribute, removeAttribute, and hasAttribute handle any attribute by name. Many common ones also mirror as properties (el.id, el.href) which can be more convenient. For custom data, use data-* attributes read via el.dataset rather than inventing attributes.