Browser Media and Device Capabilities

Outpatient Secondary Display Language and Time Zone Panel

Complete the language and time zone panel in the outpatient secondary screen scenario: include real content, actionable controls, clear state feedback, and responsive layouts across sizes.

Browser Media and Device CapabilitiesLanguage and Time Zone PanelHTMLCSSBrowser API
With JavaScript enabled, you can edit, run, and save this example. The fixed source is as follows:
<!doctype html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Outpatient Secondary Display Language and Time Zone Panel</title>
  <style>
    :root { --ink:#111111; --paper:#f8f8f4; --accent:#111111; --secondary:#8d8d88; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
    * { box-sizing:border-box; }
    html { min-width:320px; background:var(--paper); }
    body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:Helvetica,"PingFang SC",sans-serif; background:repeating-linear-gradient(0deg,transparent 0 31px,color-mix(in srgb,var(--ink) 7%,transparent) 32px),var(--paper); }
    button,input,select,textarea { color:inherit; font:inherit; }
    button,[role="button"],input,select,textarea { accent-color:var(--accent); }
    button { cursor:pointer; }
    button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
    [hidden] { display:none !important; }
    @media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
    @media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
    .page{width:min(1120px,calc(100% - 30px));margin:auto;padding:48px 0 80px}.mast{display:grid;grid-template-columns:1fr auto;border-top:10px solid var(--ink);padding-top:20px;gap:20px;align-items:end;margin-bottom:26px}.mast h1{font-family:Helvetica,"PingFang SC",sans-serif;font-weight:900;font-size:clamp(44px,10vw,106px);letter-spacing:-.075em;margin:0;line-height:.82}.eyebrow{display:inline-block;margin-bottom:12px;padding:5px 8px;color:var(--paper);background:var(--ink);font:900 10px/1 ui-monospace,monospace;letter-spacing:.14em}.intro{max-width:700px;line-height:1.55}.scenario{padding:9px 12px;border:3px solid var(--ink);font-weight:900}.demo{border:3px solid var(--ink);border-radius:0;box-shadow:12px 12px 0 var(--ink);position:relative;min-height:410px;overflow:hidden;padding:clamp(22px,4vw,46px);background:var(--paper)}@media(max-width:700px){.page{width:calc(100% - 18px);padding:20px 0}.mast{grid-template-columns:1fr}.demo{padding:15px}}
    .panel{padding:18px;border:3px solid var(--ink);background:var(--paper);box-shadow:8px 8px 0 var(--ink)}.stack{display:grid;gap:12px}.row{display:flex;flex-wrap:wrap;gap:8px}.action{min-height:42px;padding:8px 13px;border:3px solid var(--ink);background:var(--paper);font-weight:900}.action.primary,.action.is-active{color:var(--paper);background:var(--ink)}.status{min-height:24px;padding:8px;color:var(--paper);background:var(--ink);font-weight:900}.metric{font-size:clamp(34px,8vw,76px);font-weight:900;letter-spacing:-.08em}.muted{font-weight:600}.chip{padding:5px 8px;border:2px solid var(--ink);font-weight:900}.meter{height:14px;border:3px solid var(--ink)}.meter>i{display:block;height:100%;background:var(--ink)}
    .composition-deck{display:grid;grid-template-rows:auto 1fr;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:color-mix(in srgb,var(--ink) 4%,var(--paper))}.deck-bar{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:12px 18px;color:var(--paper);background:var(--ink);font:700 12px/1 ui-monospace,monospace}.deck-lights{display:flex;gap:7px}.deck-lights i{width:10px;height:10px;border-radius:50%;background:var(--accent)}.deck-lights i:nth-child(2){background:var(--secondary)}.deck-lights i:nth-child(3){background:color-mix(in srgb,var(--paper) 55%,transparent)}.composition-deck .demo{border:0;border-radius:0;box-shadow:none}
    .locale-workbench{display:grid;grid-template-columns:minmax(220px,.6fr) minmax(280px,.8fr) minmax(0,1fr);gap:14px}.locale-workbench>header{padding:24px;border:1px solid var(--line);background:var(--paper)}.locale-workbench h2{margin:.25em 0;font-size:clamp(30px,5vw,52px)}.locale-workbench>form{display:grid;align-content:start;gap:13px;padding:24px;border:1px solid var(--line)}.locale-workbench form label{display:grid;gap:6px}.locale-workbench select,.locale-workbench input{width:100%;padding:10px;border:1px solid var(--line);background:transparent}.locale-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.locale-workbench>section{display:grid;gap:16px;padding:24px;color:var(--paper);background:var(--ink)}.locale-clock{display:grid;gap:8px;padding-bottom:18px;border-bottom:1px solid currentColor}.locale-clock output{font:900 clamp(34px,7vw,70px)/1 ui-monospace,monospace}.locale-clock small{color:#ffffffaa;font:700 12px/1.4 ui-monospace,monospace}.locale-workbench section dl{display:grid;grid-template-columns:1fr 1fr;gap:9px}.locale-workbench section dl div{padding:12px;border:1px solid #ffffff44}.locale-workbench dd{margin:6px 0 0;font-weight:900}@media(max-width:1024px){.locale-workbench{grid-template-columns:1fr}}@media(max-width:760px){.locale-actions,.locale-workbench section dl{grid-template-columns:1fr}}.workflow-guide{display:grid;grid-template-columns:190px minmax(0,1fr);grid-template-areas:"rail core" "rail evidence";gap:14px 18px}.guide-rail{grid-area:rail;display:grid;align-content:start;gap:15px;padding:18px;border-right:1px solid var(--line)}.guide-rail ol{display:grid;gap:8px;padding:0;margin:0;list-style:none}.guide-rail li{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center;padding:9px;opacity:.5}.guide-rail li[aria-current="step"]{opacity:1;color:var(--paper);background:var(--ink)}.guide-rail li.is-complete{opacity:1;color:var(--accent)}.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.guide-actions .action{padding-inline:8px}#workflowGuideProgress{height:6px;background:var(--line)}#workflowGuideProgress i{display:block;width:0;height:100%;background:var(--accent)}.guide-core{grid-area:core;min-width:0;padding:16px;border:1px solid var(--line)}.guide-core>p{margin:0 0 14px;padding:10px;border-left:4px solid var(--accent);background:color-mix(in srgb,var(--secondary) 12%,transparent)}.guide-core[data-guide-step="1"]{border-radius:28px}.guide-core[data-guide-step="2"]{box-shadow:inset 0 0 0 4px color-mix(in srgb,var(--accent) 35%,transparent)}.guide-evidence{grid-area:evidence;display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:start}.guide-evidence details,.guide-evidence form{padding:12px;border:1px solid var(--line)}.guide-evidence label{display:grid;gap:7px}.guide-evidence textarea{width:100%;padding:9px;border:1px solid var(--line);background:var(--paper)}@media(max-width:900px){.workflow-guide{grid-template-columns:1fr;grid-template-areas:"core" "rail" "evidence"}.guide-rail{border-right:0;border-bottom:1px solid var(--line)}.guide-rail ol{grid-template-columns:repeat(3,1fr)}.guide-evidence{grid-template-columns:1fr}}
  </style>
</head>
<body data-aesthetic="monochrome" data-composition="control-deck">
  <main class="page">
    <header class="mast"><div><span class="eyebrow">monochrome / language and time zone panel / BEGINNER</span><h1>Outpatient Secondary Display Language and Time Zone Panel</h1><p class="intro">Complete the language and time zone panel in the outpatient secondary screen scenario: include real content, actionable controls, clear state feedback, and responsive layouts across sizes.</p></div><span class="scenario">Outpatient Secondary Screen</span></header>
    <div class="composition-deck"><div class="deck-bar"><span>CONTROL DECK · 04</span><span>Language and Time Zone Panel</span><span class="deck-lights" aria-hidden="true"><i></i><i></i><i></i></span></div><section class="demo" aria-label="Outpatient secondary display language and time zone panel interaction area"><div class="workflow-guide"><nav class="guide-rail" aria-label="Clinic Secondary Screen Guide"><span class="eyebrow">Outpatient Side Screen GUIDE</span><ol><li data-workflow-guide-step="0" aria-current="step"><b>1</b><span>Clinic secondary screen permission check</span></li><li data-workflow-guide-step="1"><b>2</b><span>Outpatient secondary screen capability log</span></li><li data-workflow-guide-step="2"><b>3</b><span>Local Save on Clinic Secondary Screen</span></li></ol><div class="guide-actions"><button id="workflowGuideBack" class="action" type="button" disabled>Previous</button><button id="workflowGuideNext" class="action primary" type="button">Complete this step</button></div><div id="workflowGuideProgress" role="progressbar" aria-label="Clinic Secondary Screen Completion" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><i></i></div></nav><section id="workflowCore" class="workflow-core guide-core" data-guide-step="0" aria-describedby="workflowGuideInstruction"><p id="workflowGuideInstruction">Please complete the actions related to ‘Outpatient Secondary Screen Permission Check’ in the main example.</p><!-- 11DZ_CORE_START:browser-media-device-locale-clock --><div class="locale-workbench"><header><span class="eyebrow">INTL WORKBENCH</span><h2>Outpatient Secondary Screen Language Time Zone Station</h2><p id="localeNative">Reading browser language</p></header><form id="localeControls"><label>Display language<select id="localeLanguage" data-core-bridge="browser-media-device-locale-clock"><option>zh-CN</option><option>en-US</option><option>ja-JP</option><option>de-DE</option></select></label><label>Target time zone<select id="localeZone"><option>Asia/Shanghai</option><option>UTC</option><option>America/New_York</option><option>Europe/Paris</option></select></label><label>Sample amount<input id="localeAmount" type="number" min="0" step="10" value="1280"></label><div class="locale-actions"><button class="action primary" type="submit">App format</button><button id="localeNow" class="action" type="button">Use current time</button></div></form><section><div class="locale-clock"><span>Local time</span><output id="localeClock">—</output><small id="localeMode">Reference Time</small></div><dl><div><dt>Date</dt><dd id="localeDate">—</dd></div><div><dt>Amount</dt><dd id="localeMoney">—</dd></div><div><dt>Numbers</dt><dd id="localeNumber">—</dd></div><div><dt>Relative time</dt><dd id="localeRelative">—</dd></div></dl></section></div><!-- 11DZ_CORE_END --></section><aside class="guide-evidence"><details id="workflowGuideDetails"><summary>View acceptance requirements</summary><ul><li>The outpatient secondary display permission check requires one visible state change</li><li>The clinic secondary screen capability log requires a visible state change.</li><li>The outpatient side screen local save needs a visible state change once</li></ul></details><form id="workflowGuideEvidenceForm"><label>This step evidence<textarea id="workflowGuideEvidence" rows="3" placeholder="Record the observed state"></textarea></label><input class="action" type="submit" value="Save evidence"></form><output id="workflowGuideSummary">0 / 3 Steps Complete</output></aside></div><p id="status" class="status" role="status" aria-live="polite"></p></section></div>
  </main>
  <script>
    'use strict';
    const statusOutput = document.querySelector('#status');
    const announce = message => { statusOutput.textContent = message; };
    /* 11DZ_CORE_SCRIPT_START:browser-media-device-locale-clock */
const localeLanguage=document.querySelector('#localeLanguage');const localeZone=document.querySelector('#localeZone');const localeAmount=document.querySelector('#localeAmount');const localeReferenceTime=new Date('2026-03-18T09:30:45Z');const localeState={locale:localeLanguage.value,zone:localeZone.value,amount:Number(localeAmount.value),live:false};function localeCurrencyFor(locale){return locale==='ja-JP'?'JPY':locale==='en-US'?'USD':'CNY';}function localeCurrentTime(){return localeState.live?new Date():localeReferenceTime;}function localeModeLabel(locale,zone,now){const baseLabel=localeState.live?'Current time':'Reference Time';const timeLabel=new Intl.DateTimeFormat(locale,{timeZone:zone,timeStyle:'medium',hour12:false}).format(now);return baseLabel+' · '+timeLabel;}function renderLocale(){const now=localeCurrentTime();const locale=localeState.locale;const zone=localeState.zone;document.querySelector('#localeNative').textContent='Browser language '+navigator.language+' · System time zone '+Intl.DateTimeFormat().resolvedOptions().timeZone+' · Display '+locale;document.querySelector('#localeClock').textContent=new Intl.DateTimeFormat(locale,{timeZone:zone,timeStyle:'medium',hour12:false}).format(now);document.querySelector('#localeDate').textContent=new Intl.DateTimeFormat(locale,{timeZone:zone,dateStyle:'full'}).format(now);document.querySelector('#localeMoney').textContent=new Intl.NumberFormat(locale,{style:'currency',currency:localeCurrencyFor(locale)}).format(localeState.amount);document.querySelector('#localeNumber').textContent=new Intl.NumberFormat(locale,{notation:'compact',maximumFractionDigits:1}).format(localeState.amount*183);document.querySelector('#localeRelative').textContent=new Intl.RelativeTimeFormat(locale,{numeric:'auto'}).format(3,'day');document.querySelector('#localeMode').textContent=localeModeLabel(locale,zone,now);}localeLanguage.addEventListener('change',()=>{localeState.locale=localeLanguage.value;localeState.live=false;renderLocale();announce('Display language has been switched to '+localeState.locale);});document.querySelector('#localeControls').addEventListener('submit',event=>{event.preventDefault();localeState.locale=localeLanguage.value;localeState.zone=localeZone.value;localeState.amount=Number(localeAmount.value)||0;localeState.live=false;renderLocale();announce('Language, time zone, and currency formats have been applied');});document.querySelector('#localeNow').addEventListener('click',()=>{localeState.locale=localeLanguage.value;localeState.zone=localeZone.value;localeState.amount=Number(localeAmount.value)||0;localeState.live=true;renderLocale();announce('Switched to current-time preview');});renderLocale();
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"browser-media-device-locale-clock","selector":"[data-core-bridge=\"browser-media-device-locale-clock\"]","mode":"select","key":"ArrowRight"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · Core Version '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.setAttribute('aria-keyshortcuts',workflowBridgeSpec.key);workflowBridgeControl.addEventListener('keydown',event=>{if(event.key!==workflowBridgeSpec.key)return;event.preventDefault();workflowBridgeControl.selectedIndex=(workflowBridgeControl.selectedIndex+1)%workflowBridgeControl.options.length;workflowBridgeControl.dispatchEvent(new Event('input',{bubbles:true}));workflowBridgeControl.dispatchEvent(new Event('change',{bubbles:true}));});workflowBridgeControl.addEventListener("keydown",workflowBridgeScheduleCommit);workflowBridgeControl.addEventListener('input',workflowBridgeScheduleCommit);workflowBridgeControl.addEventListener('change',workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();workflowBridgeControl.selectedIndex=(workflowBridgeControl.selectedIndex+1)%workflowBridgeControl.options.length;workflowBridgeControl.dispatchEvent(new Event('change',{bubbles:true}));const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowGuideCore=document.querySelector('#workflowCore');const workflowGuideStages=["Clinic secondary screen permission check","Outpatient secondary screen capability log","Local Save on Clinic Secondary Screen"];const workflowGuideState={step:0,completed:new Set(),evidence:new Map(),consumedVersion:0};function workflowGuideDrive(){const step=workflowGuideState.step;workflowGuideCore.dataset.guideStep=String(step);document.querySelector('#workflowGuideInstruction').textContent='Please complete the main example ‘'+workflowGuideStages[step]+'Related actions.”';document.querySelectorAll('[data-workflow-guide-step]').forEach((item,index)=>{item.classList.toggle('is-complete',workflowGuideState.completed.has(index));if(index===step)item.setAttribute('aria-current','step');else item.removeAttribute('aria-current');});document.querySelector('#workflowGuideBack').disabled=step===0;document.querySelector('#workflowGuideNext').textContent=step===workflowGuideStages.length-1?'Recording capability':'Complete this step';const percent=Math.round(workflowGuideState.completed.size/workflowGuideStages.length*100);const progress=document.querySelector('#workflowGuideProgress');progress.setAttribute('aria-valuenow',String(percent));progress.querySelector('i').style.width=percent+'%';document.querySelector('#workflowGuideSummary').textContent=workflowGuideState.completed.size+' / '+workflowGuideStages.length+' Step complete · '+workflowBridgeSummary();announce('Current step on the clinic side screen:'+workflowGuideStages[step]);}function workflowGuideAdvance(direction){if(direction>0){const bridge=workflowBridgeActivate();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('Please complete the visible state change in the main example first');return;}workflowGuideState.consumedVersion=version;workflowGuideState.completed.add(workflowGuideState.step);announce('Main case changes recorded · '+bridge.summary);}workflowGuideState.step=Math.max(0,Math.min(workflowGuideStages.length-1,workflowGuideState.step+direction));workflowGuideDrive();}document.querySelector('#workflowGuideBack').addEventListener('click',()=>workflowGuideAdvance(-1));document.querySelector('#workflowGuideNext').addEventListener('click',()=>workflowGuideAdvance(1));document.querySelector('#workflowGuideEvidenceForm').addEventListener('submit',event=>{event.preventDefault();const version=Number(workflowGuideCore.dataset.workflowVersion||0);if(version<=workflowGuideState.consumedVersion){announce('Evidence not saved: the main example has no new changes yet');return;}const text=document.querySelector('#workflowGuideEvidence').value.trim();workflowGuideState.evidence.set(workflowGuideState.step,text||'Visible status check completed');workflowGuideState.completed.add(workflowGuideState.step);workflowGuideState.consumedVersion=version;workflowGuideDrive();announce('Evidence for this step has been saved · '+workflowBridgeSummary());});document.querySelector('#workflowGuideDetails').addEventListener('toggle',event=>announce(event.currentTarget.open?'Acceptance requirements expanded':'Acceptance requirements collapsed'));workflowGuideDrive();
workflowBridgeReset();
  </script>
</body>
</html>
Page feedbackFound an issue or have suggestions for improvement?
Feedback features need to be used in the online version

Please enable JavaScript in the online version before submitting; local features of the current tool or example are not affected.

Go to the online version for feedback