Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/javelin/markup.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | if ($attributes['aural']) { | ||||
$class = idx($attributes, 'class', ''); | $class = idx($attributes, 'class', ''); | ||||
$class = rtrim('visual-only '.$class); | $class = rtrim('visual-only '.$class); | ||||
$attributes['class'] = $class; | $attributes['class'] = $class; | ||||
$attributes['aria-hidden'] = 'true'; | $attributes['aria-hidden'] = 'true'; | ||||
} | } | ||||
unset($attributes['aural']); | unset($attributes['aural']); | ||||
} | } | ||||
if (isset($attributes['print'])) { | |||||
if ($attributes['print']) { | |||||
$class = idx($attributes, 'class', ''); | |||||
$class = rtrim('print-only '.$class); | |||||
$attributes['class'] = $class; | |||||
// NOTE: Alternative print content is hidden from screen readers. | |||||
$attributes['aria-hidden'] = 'true'; | |||||
} else { | |||||
$class = idx($attributes, 'class', ''); | |||||
$class = rtrim('screen-only '.$class); | |||||
$attributes['class'] = $class; | |||||
} | |||||
unset($attributes['print']); | |||||
} | |||||
return phutil_tag($tag, $attributes, $content); | return phutil_tag($tag, $attributes, $content); | ||||
} | } | ||||
function phabricator_form(PhabricatorUser $user, $attributes, $content) { | function phabricator_form(PhabricatorUser $user, $attributes, $content) { | ||||
$body = array(); | $body = array(); | ||||
$http_method = idx($attributes, 'method'); | $http_method = idx($attributes, 'method'); | ||||
$is_post = (strcasecmp($http_method, 'POST') === 0); | $is_post = (strcasecmp($http_method, 'POST') === 0); | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |