001/*
002 * Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package org.jdrupes.mdoclet.internal.doclets.formats.html.markup;
027
028import org.jdrupes.mdoclet.internal.doclets.toolkit.util.Utils;
029
030/**
031 * Enum representing HTML tag attributes.
032 */
033public enum HtmlAttr {
034    ALT,
035    ARIA_CONTROLS("aria-controls"),
036    ARIA_EXPANDED("aria-expanded"),
037    ARIA_LABEL("aria-label"),
038    ARIA_LABELLEDBY("aria-labelledby"),
039    ARIA_ORIENTATION("aria-orientation"),
040    ARIA_SELECTED("aria-selected"),
041    CHECKED,
042    CLASS,
043    CLEAR,
044    COLS,
045    CONTENT,
046    DATA_COPIED("data-copied"), // custom HTML5 data attribute
047    DISABLED,
048    FOR,
049    HREF,
050    HTTP_EQUIV("http-equiv"),
051    ID,
052    LANG,
053    NAME,
054    ONCLICK,
055    ONKEYDOWN,
056    ONLOAD,
057    PLACEHOLDER,
058    REL,
059    ROLE,
060    ROWS,
061    SCOPE,
062    SCROLLING,
063    SRC,
064    STYLE,
065    SUMMARY,
066    TABINDEX,
067    TARGET,
068    TITLE,
069    TYPE,
070    VALUE,
071    WIDTH;
072
073    private final String value;
074
075    public enum Role {
076
077        BANNER,
078        CONTENTINFO,
079        MAIN,
080        NAVIGATION,
081        REGION;
082
083        private final String role;
084
085        Role() {
086            role = Utils.toLowerCase(name());
087        }
088
089        public String toString() {
090            return role;
091        }
092    }
093
094    HtmlAttr() {
095        this.value = Utils.toLowerCase(name());
096    }
097
098    HtmlAttr(String name) {
099        this.value = name;
100    }
101
102    public String toString() {
103        return value;
104    }
105}