Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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

              
                <div style="padding:20px;">
  
<h1 style="font-size: 24px;">Be nice to screen-reader users</h1>
 
<h2 style="font-size: 20px;margin:20px 0;">Example 1</h2>

<p>An anchor/link is used to wrap many elements to make the whole group clickable.</p>

<pre style="font-family:monospace;background:#ececec;border-radius:3px;padding-left:10px;">
<code>
<mark>&lt;a href="https://..."></mark>
  &lt;div>
    &lt;h4>Friends of Photography&lt;/h4>
  &lt;/div>
  &lt;div>
    &lt;h5>Fly with the Monarchs!&lt;/h5>
    &lt;time datetime="2018-01-29T13:00:00.000-05:00">
      &lt;span>Today&lt;/span>
      &lt;span>1:00 PM&lt;/span>
    &lt;/time>
  &lt;/div>
<mark>&lt;/a></mark>
</code>
</pre>

<a class="eventCard--hasGroup" href="https://www.meetup.com/northbayphotography/events/246350907/">
	<div class="eventCard-group inverted" style="background-image: url(https://secure.meetupstatic.com/photo_api/event/dtfa002fx00a8ff/sg754a8ecefd/467591292.jpeg);">
		<h4 class="text--heavy text--big">Friends of Photography</h4>
	</div>
	<div class="eventCard-event chunk">
		<h5 class="text--small text--heavy">Fly with the Monarchs!</h5>
			<time class="text--small" datetime="2018-01-27T13:00:00.000-05:00">
					<span>Today</span>
				<span class="text--middotLeft">1:00 PM</span>
			</time>
	</div>
</a>

<h3 style="font-size: 20px;">VoiceOver transcript:</h3>

<blockquote style="font:bold italic 18px serif;margin:20px;">
  <p>"Link friends of photography fly with the monarchs today middle dot 1 0 0 p m"</p>
</blockquote>

<h2 style="font-size: 20px;margin:60px 0 20px 0;">Example 2</h2>

<p>A <em style="font-weight:bold;">pseudo-element</em> is used to make an entire group "clickable" which allows to create proper/better link text.</p>

<pre style="font-family:monospace;background:#ececec;border-radius:3px;padding-left:10px;">
<code>
&lt;div>
  &lt;div>
    &lt;h4>
      <mark>&lt;a href="https://..."></mark>Friends of Photography<mark>&lt;/a></mark>
    &lt;/h4>
  &lt;/div>
  &lt;div>
    &lt;h5>Fly with the Monarchs!&lt;/h5>
    &lt;time datetime="2018-01-29T13:00:00.000-05:00">
      &lt;span>Today&lt;/span>
      &lt;span>1:00 PM&lt;/span>
    &lt;/time>
  &lt;/div>
&lt;/div>
</code>
</pre>

<div class="eventCard--hasGroup">
	<div class="eventCard-group inverted" style="background-image: url(https://secure.meetupstatic.com/photo_api/event/dtfa002fx00a8ff/sg754a8ecefd/467591292.jpeg);">
    <h4 class="text--heavy text--big">
      <a href="https://www.meetup.com/northbayphotography/events/246350907/">Friends of Photography</a></h4>
	</div>
	<div class="eventCard-event chunk">
		<h5 class="text--small text--heavy">Fly with the Monarchs!</h5>
			<time class="text--small" datetime="2018-01-27T13:00:00.000-05:00">
					<span>Today</span>
				<span class="text--middotLeft">1:00 PM</span>
			</time>
	</div>
</div>

<h3 style="font-size:20px;">VoiceOver transcript:</h3>

<blockquote style="font:bold italic 18px serif;margin:20px;">
  <p>"Link friends of photography"</p>
</blockquote>
</div>
              
            
!

CSS

              
                .eventCard-group {
  position: static; /* reset from style set in main.css */
}
.eventCard--hasGroup {
  position:relative;
}
.eventCard--hasGroup a::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
/**
 * To mimic the same outline as the original
 */
.eventCard--hasGroup a {
  outline: none;
}
.eventCard--hasGroup a:focus::before {
  outline: -webkit-focus-ring-color auto 5px;
}

/**
 * This is not related to this demo
 * see: https://developer.paciellogroup.com/blog/2017/12/short-note-on-making-your-mark-more-accessible/
 */
mark::before, mark::after {
  content:" [highlight start] ";
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

mark::after {
  content:" [highlight end] ";
}
              
            
!

JS

              
                
              
            
!
999px

Console