Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1>details/summary test</h1>

<ul>
  <li>Announcements are very different across different screen readers/browsers. It goes from little information (“show more” in VoiceOver on iOS) to too much information (“Right pointing triangle, Show more, collapsed, summary, group” in Firefox on macOs)</.i>
<li>Removing or changing the triangle doesn’t seem to affect any screen reader/browser pairing except Firefox with all tested screen readers.</li>
<li>Voice Over macOS Chrome/Edge/Arc, Voice Over macOS Safari, and Talkback Android Chrome provide the most consistent experience.</li>
<li>Voice Over iOS Safari is also very consistent but in a bad way. It doesn’t announce any role.</li>
<li>Details only expands in Chrome, Arc, Edge when you search with <kbd>CMD</kbd>/<kbd>Ctrl</kbd> + <kbd>F</kbd> (find-in-page).</li>
<li>To remove the triangle in Safari, you must set <code>::-webkit-details-marker</code> to <code>display: none</code>. <br><code>::marker</code> or <code>list-style: none;</code> don't work.</li>
  
  
</ul>

<h2>default</h2>

<details>
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>


<div>
  <table>
    <thead>
      <tr>
        <td></td>
        <th>Voice Over macOS Chrome/Edge/arc</th>
        <th>Voice Over macOS Firefox</th>
        <th>Voice Over macOS Safari</th>
        <th>Voice Over iOS Safari</th>
        <th>Talkback Android Chrome</th>
        <th>NVDA Firefox</th>
        <th>JAWS Chrome</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <th>
          Announcement on focus
        </th>
        <td>
          Show More, collapsed, disclosure triangle, group
        </td>
        <td>
          Right pointing triangle, Show more, collapsed, summary, group<br>
          or<br>
          Show more, collapsed, summary, group
        </td>
        <td>Show More, collapsed, summary, group</td>
        <td>Show More</td>
        <td>
          Collapsed, show more, disclosure triangle
        </td>
        <td>
          Filled right pointing small triangle, show more, button, collapsed
        </td>
        <td>Show more, button, collapsed</td>
      </tr>
      <tr>
        <th>
          Announcement on toggle
        </th>
        <td>
          Show More, expanded, disclosure triangle, group
        </td>
        <td>
          Show More
        </td>
        <td>Show More, expanded, summary, group</td>
        <td>Show More</td>
        <td>
          expanded
        </td>
        <td>
          expanded, filled down pointing small triangle, show more<
        </td>
        <td>expanded</td>
      </tr>
    </tbody>
  </table>
</div>

<h2>custom marker: <code>list-style-type: square</code></h2>

<details class="custommarker">
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>

<div>
<table>
  <thead>
    <tr>
      <td></td>
      <th>Voice Over macOS Chrome/Edge/arc</th>
      <th>Voice Over macOS Firefox</th>
      <th>Voice Over macOS Safari</th>
      <th>Voice Over iOS Safari</th>
      <th>Talkback Android Chrome</th>
      <th>NVDA Firefox</th>
      <th>JAWS Chrome</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <th>
        Announcement on focus
      </th>
      <td>
        Show More, collapsed, disclosure triangle, group
      </td>
      <td>
        Black small square, Show more, collapsed, summary, group<br>
        or<br>
        Show more, collapsed, summary, group
      </td>
      <td>Show More, collapsed, summary, group</td>
      <td>Show More</td>
      <td>
        Collapsed, show more, disclosure triangle
      </td>
      <td>
        Show more, button, collapsed
      </td>
      <td>Show more, button, collapsed</td>
    </tr>
    <tr>
      <th>
        Announcement on toggle
      </th>
      <td>
        Show More, expanded, disclosure triangle, group
      </td>
      <td>
        /
      </td>
      <td>Show More, expanded, summary, group</td>
      <td>Show More</td>
      <td>
        expanded
      </td>
      <td>
        expanded
      </td>
      <td>expanded</td>
    </tr>
  </tbody>
</table>
</div>

<h2>custom marker: <code>::marker</code></h2>

<details class="custommarker2">
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>

<div>
  
<table>
  <thead>
    <tr>
      <td></td>
      <th>Voice Over macOS Chrome/Edge/arc</th>
      <th>Voice Over macOS Firefox</th>
      <th>Voice Over macOS Safari</th>
      <th>Voice Over iOS Safari</th>
      <th>Talkback Android Chrome</th>
      <th>NVDA Firefox</th>
      <th>JAWS Chrome</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <th>
        Announcement on focus
      </th>
      <td>
        Show More, collapsed, disclosure triangle, group
      </td>
      <td>
        Beaver, Show more, collapsed, summary, group<br>
        or<br>
        Show more, collapsed, summary, group
      </td>
      <td>Show More, collapsed, summary, group</td>
      <td>Show More</td>
      <td>
        Collapsed, show more, disclosure triangle
      </td>
      <td>
        Beaver, Show more, button, collapsed
      </td>
      <td>Show more, button, collapsed</td>
    </tr>
    <tr>
      <th>
        Announcement on toggle
      </th>
      <td>
        Show More, expanded, disclosure triangle, group
      </td>
      <td>
        Beaver, Show More
      </td>
      <td>Show More, expanded, summary, group</td>
      <td>Show More</td>
      <td>
        expanded
      </td>
      <td>
        expanded
      </td>
      <td>expanded</td>
    </tr>
  </tbody>
</table>
</div>

<h2>no marker: <code>list-style-type: none;</code></h2>

<details class="nomarker">
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>

<div>
  <table>
  <thead>
    <tr>
      <td></td>
      <th>Voice Over macOS Chrome/Edge/arc</th>
      <th>Voice Over macOS Firefox</th>
      <th>Voice Over macOS Safari</th>
      <th>Voice Over iOS Safari</th>
      <th>Talkback Android Chrome</th>
      <th>NVDA Firefox</th>
      <th>JAWS Chrome</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <th>
        Announcement on focus
      </th>
      <td>
        Show More, collapsed, disclosure triangle, group
      </td>
      <td>
        Show more, collapsed, summary, group
      </td>
      <td>Show More, collapsed, summary, group</td>
      <td>Show More</td>
      <td>
        Collapsed, show more, disclosure triangle
      </td>
      <td>
        Show more, button, collapsed
      </td>
      <td>Show more, button, collapsed</td>
    </tr>
    <tr>
      <th>
        Announcement on toggle
      </th>
      <td>
        Show More, expanded, disclosure triangle, group
      </td>
      <td>
        /
      </td>
      <td>Show More, expanded, summary, group</td>
      <td>Show More</td>
      <td>
        expanded
      </td>
      <td>
        expanded
      </td>
      <td>expanded</td>
    </tr>
  </tbody>
</table>
</div>

<h2>no marker: <code>::marker content:""</code></h2>

<details class="nomarker2">
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>


<div>
  <table>
  <thead>
    <tr>
      <td></td>
      <th>Voice Over macOS Chrome/Edge/arc</th>
      <th>Voice Over macOS Firefox</th>
      <th>Voice Over macOS Safari</th>
      <th>Voice Over iOS Safari</th>
      <th>Talkback Android Chrome</th>
      <th>NVDA Firefox</th>
      <th>JAWS Chrome</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <th>
        Announcement on focus
      </th>
      <td>
        Show More, collapsed, disclosure triangle, group
      </td>
      <td>
        Show more, collapsed, summary, group
      </td>
      <td>Show More, collapsed, summary, group</td>
      <td>Show More</td>
      <td>
        Collapsed, show more, disclosure triangle
      </td>
      <td>
        Show more, button, collapsed
      </td>
      <td>Show more, button, collapsed</td>
    </tr>
    <tr>
      <th>
        Announcement on toggle
      </th>
      <td>
        Show More, expanded, disclosure triangle, group
      </td>
      <td>
        /
      </td>
      <td>Show More, expanded, summary, group</td>
      <td>Show More</td>
      <td>
        expanded
      </td>
      <td>
        expanded
      </td>
      <td>expanded</td>
    </tr>
  </tbody>
</table>
</div>

<h2>Remove triangle in all browsers</h2>

<details class="custommarker3">
  <summary>Show More</summary>
  
  Here’s Johnny!
</details>

<p>
  <a href="https://codepen.io/scottohara/pen/aaJXYG">More detailed testing resuluts by Scott O'Hara</a> and corressponding <a href="https://www.scottohara.me/blog/2022/09/12/details-summary.html"> article (“The details and summary elements, again”).</a>
</p>
              
            
!

CSS

              
                .nomarker summary {
  list-style-type: none;
}

.nomarker2 summary::marker,
.nomarker2 summary::-webkit-details-marker {
  content: "";
}

.custommarker summary {
  list-style-type: square;
}

.custommarker2 summary::marker,
.custommarker2 summary::-webkit-details-marker {
  content: "🦫"
}

.custommarker3 summary::-webkit-details-marker {
  display: none;
}

.custommarker3 summary {
  list-style: none;
}

body > * + * {
  margin-top: 2rem  ;
}

body {
  font-size: 1.2rem;
  font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
  line-height: 1.5;
}

td, tr, table, th {
  border: 1px solid;
}

td {
  vertical-align: top;
}

div {
  overflow: auto;
}

th {
  white-space: nowrap;
}

td, th {
  padding: 1rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console