<ul class="decision-tree">
    <li><strong>Does the image contain text?</strong>
        <ul>
            <li class="yes"><strong>Yes:</strong>
                <ul>
                    <li><strong>… and the text is also present as <em>real</em> text nearby.</strong>
                        <em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
                    <li><strong>… and the text is only shown for visual effects.</strong>
                        <em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
                    <li><strong>… and the text has a specific function, for example is an icon.</strong>
                        <em>Use the <code>alt</code> attribute to communicate the function of the image. See <a href="../functional/">Functional Images</a>.</em></li>
                    <li><strong>… and the text in the image is not present otherwise.</strong> <em>Use the <code>alt</code> attribute to include the text of the image. See <a href="../textual/#image-of-styled-text-with-decorative-effect">Images of Text</a>.</em></li>
                </ul>
            </li>
            <li class="no"><strong>No:</strong>
                <ul>
                    <li>Continue.</li>
                </ul>
            </li>
        </ul>
    </li>
    <li><strong>Is the image used in a link or a button, and would it be hard or impossible to understand what the link or the button does, if the image wasn’t there?</strong>
        <ul>
            <li class="yes"><strong>Yes:</strong>
                <ul>
                    <li><em>Use the <code>alt</code> attribute to communicate the destination of the link or action taken. See <a href="../functional/">Functional Images</a>.</em></li>
                </ul>
            </li>
            <li class="no"><strong>No:</strong>
                <ul>
                    <li>Continue.</li>
                </ul>
            </li>
        </ul>
    </li>
    <li><strong>Does the image contribute meaning to the current page or context?</strong>
        <ul>
            <li class="yes"><strong>Yes:</strong>
                <ul>
                    <li><strong>… and it’s a simple graphic or photograph.</strong>
                        <em>Use a brief description of the image in a way that conveys that meaning in the <code>alt</code> attribute. See <a href="../informative/">Informative Images</a>.</em></li>
                    <li><strong>… and it’s a graph or complex piece of information.</strong>
                        <em>Include the information contained in the image elsewhere on the page. See <a href="../complex/">Complex Images</a>.</em></li>
                    <li><strong>… and it shows content that is redundant to <em>real</em> text nearby.</strong>
                        <em>Use an empty <code>alt</code> attribute. See (redundant) <a href="../functional/#logo-image-within-link-text">Functional Images</a>.</em></li>
                </ul>
            </li>
            <li class="no"><strong>No:</strong>
                <ul>
                    <li>Continue.</li>
                </ul>
            </li>
        </ul>
    </li>
    <li><strong>Is the image purely decorative or not intended for the user?</strong>
        <ul>
            <li class="yes"><strong>Yes:</strong>
                <ul>
                    <li><em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
                </ul>
            </li>
            <li class="no"><strong>No:</strong>
                <ul>
                    <li>Continue.</li>
                </ul>
            </li>
        </ul>
    </li>
    <li><strong>Is the image’s use not listed above or it’s unclear what <code>alt</code> text to provide?</strong>
        <ul>
            <li class="yes">This decision tree <strong>does not</strong> cover all cases. For detailed information on the provision of text alternatives refer to the <a href="../">Image Concepts Page</a>.</li>
        </ul>
    </li>
</ul>
<ul class="decision-tree">
  <li><strong>Does the image contain text?</strong>
    <ul>
      <li class="yes"><strong>Yes:</strong>
        <ul>
          <li><strong>… and the text is also present as <em>real</em> text nearby.</strong>
<em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
          <li><strong>… and the text is only shown for visual effects.</strong>
<em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
          <li><strong>… and the text has a specific function, for example is an icon.</strong>
  <em>Use the <code>alt</code> attribute to communicate the function of the image. See <a href="../functional/">Functional Images</a>.</em></li>
          <li><strong>… and the text in the image is not present otherwise.</strong> <em>Use the <code>alt</code> attribute to include the text of the image. See <a href="../textual/#image-of-styled-text-with-decorative-effect">Images of Text</a>.</em></li>
        </ul>
      </li>
      <li class="no"><strong>No:</strong>
        <ul>
          <li>Continue.</li>
        </ul>
      </li>
    </ul>
  </li>
  <li><strong>Is the image used in a link or a button, and would it be hard or impossible to understand what the link or the button does, if the image wasn’t there?</strong>
    <ul>
      <li class="yes"><strong>Yes:</strong>
        <ul>
          <li><em>Use the <code>alt</code> attribute to communicate the destination of the link or action taken. See <a href="../functional/">Functional Images</a>.</em></li>
        </ul>
      </li>
      <li class="no"><strong>No:</strong>
        <ul>
          <li>Continue.</li>
        </ul>
      </li>
    </ul>
  </li>
  <li><strong>Does the image contribute meaning to the current page or context?</strong>
    <ul>
      <li class="yes"><strong>Yes:</strong>
        <ul>
          <li><strong>… and it’s a simple graphic or photograph.</strong>
<em>Use a brief description of the image in a way that conveys that meaning in the <code>alt</code> attribute. See <a href="../informative/">Informative Images</a>.</em></li>
          <li><strong>… and it’s a graph or complex piece of information.</strong>
<em>Include the information contained in the image elsewhere on the page. See <a href="../complex/">Complex Images</a>.</em></li>
          <li><strong>… and it shows content that is redundant to <em>real</em> text nearby.</strong>
<em>Use an empty <code>alt</code> attribute. See (redundant) <a href="../functional/#logo-image-within-link-text">Functional Images</a>.</em></li>
        </ul>
      </li>
      <li class="no"><strong>No:</strong>
        <ul>
          <li>Continue.</li>
        </ul>
      </li>
    </ul>
  </li>
  <li><strong>Is the image purely decorative or not intended for the user?</strong>
    <ul>
      <li class="yes"><strong>Yes:</strong>
        <ul>
          <li><em>Use an empty <code>alt</code> attribute. See <a href="../decorative/">Decorative Images</a>.</em></li>
        </ul>
      </li>
      <li class="no"><strong>No:</strong>
        <ul>
          <li>Continue.</li>
        </ul>
      </li>
    </ul>
  </li>
  <li><strong>Is the image’s use not listed above or it’s unclear what <code>alt</code> text to provide?</strong>
    <ul>
      <li class="yes">This decision tree <strong>does not</strong> cover all cases. For detailed information on the provision of text alternatives refer to the <a href="../">Image Concepts Page</a>.</li>
    </ul>
  </li>
</ul>
/* No context defined for this component. */
  • Content:
    .decision-tree {
      list-style: none;
      margin: 1em 0;
      padding:0;
      & > li {
        /*border: 2px solid #999;
        border-block-start:none;*/
        & > strong {
          display: block;
          padding: 1em .5em;
        }
        &:first-child {
          /*border-block-start:2px solid #999;*/
        }
        & > ul {
          padding:0;
          list-style: none;
          /*border-block-start: 1px dotted #aaa;*/
          @supports (display: flex) {
            display:flex;
            flex-direction: row-reverse;
            flex-wrap: wrap;
            align-items: stretch;
          }
          & > li {
            text-indent: 0;
            box-sizing: border-box;
            font-weight: normal;
            @supports (display: flex) {
              flex-basis: 25%;
            }
            padding: .5em;
            // border: 1px solid #aaa;
            &:nth-child(odd) {
              @supports (display: flex) {
                flex-basis: 75%;
              }
            }
            &:nth-child(odd):last-child {
              display:block;
              flex-basis:100%;
            }
            & ul {
              padding:0;
              margin:0;
            }
            & li {
              padding: 0;
              padding-bottom: 0.5em;
              margin-block-end: 0.5em;
              border-block-end: 1px solid var(--dk-grey);
              list-style: none;
              & > em {
                display: block;
                padding-left: 1.5em;
                position: relative;
                margin-block-start: .25em;
                font-style: normal;
                &:before {
                  position:absolute;
                  content: '';
                  top:.2em;
                  margin-inline-start: -1.5em;
                }
              }
              &:last-child {
                border-bottom-style: none;
                padding-bottom: 0;
                margin-block-end: 0;
              }
            }
          }
        }
      }
      & .yes {
        background-color: color(var(--w3c-blue) lightness(95%));
        border-block-end: none;
        & li {
          list-style: disc;
          margin-inline-start: 1em;
          &:only-child {
            list-style: none;
          }
        }
      }
      & .no {
        /*border-inline-end:1px dotted #aaa;*/
        background-color: color(var(--faded-red) lightness(85%));
        border-block-end: none;
        position: relative;
        &:after { top: 100%; left: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; border-color: rgba(119, 119, 119, 0); border-top-color: color(var(--faded-red) lightness(85%)); border-width: 1rem; margin-inline-start: -.5rem; z-index: 500; }
        /*&:before { top: 100%; left: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; border-color: rgba(119, 119, 119, 0); border-top-color: #999; border-width: 1.1rem; margin-inline-start: -.6rem; z-index: 400; }*/
      }
    }
  • URL: /components/raw/decision-tree/decision-tree.css
  • Filesystem Path: components/decision-tree/decision-tree.css
  • Size: 2.7 KB

There are no notes for this item.