Changeset 3081378
- Timestamp:
- 05/05/2024 02:18:28 AM (3 months ago)
- Location:
- accessibility-checker
- Files:
-
- 42 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
accessibility-checker/tags/1.11.1/accessibility-checker.php
r3080015 r3081378 11 11 * Plugin URI: https://a11ychecker.com 12 12 * Description: Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance. 13 * Version: 1.11. 013 * Version: 1.11. 14 14 * Author: Equalize Digital 15 15 * Author URI: https://equalizedigital.com … … 42 42 // Current plugin version. 43 43 if ( ! defined( 'EDAC_VERSION' ) ) { 44 define( 'EDAC_VERSION', '1.11. 0' );44 define( 'EDAC_VERSION', '1.11.' ); 45 45 } 46 46 -
accessibility-checker/tags/1.11.1/admin/class-admin-notices.php
r3080015 r3081378 267 267 268 268 // first time if notice has never been shown wait 14 days. 269 if ( false === $edac_review_notice_reminder && false === $edac_review_notice) {269 if ( false === $edac_review_notice_reminder && ) { 270 270 // if option isn't set and plugin has been active for more than 14 days show notice. This is for current users. 271 271 if ( edac_days_active() > 14 ) { -
accessibility-checker/tags/1.11.1/includes/rules/empty_button.php
r3080015 r3081378 28 28 foreach ( $buttons as $button ) { 29 29 if ( 30 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $button->plaintext ) ) === ''31 && $button->getAttribute( 'aria-label' ) === ''32 && $button->getAttribute( 'title' ) === ''30 31 && 32 && 33 33 ) { 34 34 … … 40 40 if ( 41 41 '' !== $error_code 42 && ( ! isset( $image[0] ) || trim( $image[0]->getAttribute( 'alt' ) ) === '')43 && ( ! isset( $input[0] ) || trim( $input[0]->getAttribute( 'value' ) ) === '')42 && ( ! isset( $image[0] ) || ) 43 && ( ! isset( $input[0] ) || ) 44 44 && ( 45 45 ! isset( $i[0] ) || 46 46 ( 47 ( trim( $i[0]->getAttribute( 'title' ) ) === '') &&48 ( trim( $i[0]->getAttribute( 'aria-label' ) ) === '')47 ( ) && 48 ( ) 49 49 ) 50 50 ) … … 57 57 // check inputs. 58 58 foreach ( $inputs as $input ) { 59 if ( $input->getAttribute( 'value' ) === '') {59 if ( ) { 60 60 $errors[] = $input->outertext; 61 61 } -
accessibility-checker/tags/1.11.1/includes/rules/empty_heading_tag.php
r3080015 r3081378 27 27 $heading_code = $heading->outertext; 28 28 29 if ( ( str_ireplace( [ ' ', ' ', '-', '_' ], '', htmlentities( trim( $heading->plaintext ) ) ) === '' || str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $heading->plaintext ) ) === '' ) && ! preg_match( '#<img(\S|\s)*alt=(\'|\")(\w|\s)(\w|\s|\p{P}|\(|\)|\p{Sm}|~|`|’|\^|\$)+(\'|\")#', $heading_code ) ) { 29 if ( ( 30 empty( str_ireplace( [ ' ', ' ', '-', '_' ], '', htmlentities( trim( $heading->plaintext ) ) ) ) || 31 empty( str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $heading->plaintext ) ) ) 32 ) && 33 empty( $heading->getAttribute( 'aria-label' ) ) && 34 ! preg_match( 35 '#<img(\S|\s)*alt=(\'|\")(\w|\s)(\w|\s|\p{P}|\(|\)|\p{Sm}|~|`|’|\^|\$)+(\'|\")#', 36 $heading_code 37 ) 38 ) { 30 39 31 40 $errors[] = $heading_code; -
accessibility-checker/tags/1.11.1/includes/rules/empty_link.php
r3080015 r3081378 23 23 24 24 if ( 25 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $link->plaintext ) ) === ''25 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $link->plaintext ) ) === '' 26 26 && $link->hasAttribute( 'href' ) 27 && $link->getAttribute( 'aria-label' ) === ''28 && $link->getAttribute( 'title' ) === ''27 && 28 && 29 29 ) { 30 30 … … 46 46 47 47 $image = $link->find( 'img' ); 48 if ( ! $error && isset( $input[0] ) && trim( $image[0]->getAttribute( 'alt' ) ) === '') {48 if ( ! $error && isset( $input[0] ) && ) { 49 49 50 50 // The first image inside the link does not have an alt. … … 54 54 55 55 $input = $link->find( 'input' ); 56 if ( ! $error && isset( $input[0] ) && trim( $image[0]->getAttribute( 'value' ) ) === '') {56 if ( ! $error && isset( $input[0] ) && ) { 57 57 58 58 // The first input inside the link does not have a value. … … 63 63 $i = $link->find( 'i' ); 64 64 if ( ! $error && isset( $input[0] ) && 65 trim( $i[0]->getAttribute( 'title' ) ) === ''&&66 trim( $i[0]->getAttribute( 'aria-label' ) ) === ''65 && 66 67 67 ) { 68 68 -
accessibility-checker/tags/1.11.1/includes/rules/iframe_missing_title.php
r3080015 r3081378 20 20 21 21 foreach ( $iframe_tags as $iframe ) { 22 if ( isset( $iframe ) && $iframe->getAttribute( 'title' ) === '' && $iframe->getAttribute( 'aria-label' ) === '') {22 if ( isset( $iframe ) && ) { 23 23 24 24 $iframecode = htmlspecialchars( $iframe->outertext ); -
accessibility-checker/tags/1.11.1/includes/rules/img_alt_empty.php
r3080015 r3081378 28 28 && 'img' === $element->tag 29 29 && $element->hasAttribute( 'alt' ) 30 && $element->getAttribute( 'alt' ) === ''30 && $element->getAttribute( 'alt' ) === '' 31 31 && $element->getAttribute( 'role' ) !== 'presentation' 32 32 ) || ( … … 34 34 && $element->hasAttribute( 'alt' ) 35 35 && $element->getAttribute( 'type' ) === 'image' 36 && $element->getAttribute( 'alt' ) === ''36 && $element->getAttribute( 'alt' ) === '' 37 37 ) 38 38 ) { -
accessibility-checker/tags/1.11.1/includes/rules/img_linked_alt_empty.php
r3080015 r3081378 22 22 23 23 // anchors with aria-label or title or valid node text. 24 if ( $a->getAttribute( 'aria-label' ) === '' && $a->getAttribute( 'title' ) === ''&& strlen( $a->plaintext ) <= 5 ) {24 if ( && strlen( $a->plaintext ) <= 5 ) { 25 25 26 26 $images = $a->find( 'img' ); … … 29 29 if ( isset( $image ) 30 30 && $image->hasAttribute( 'alt' ) 31 && $image->getAttribute( 'alt' ) === ''31 && $image->getAttribute( 'alt' ) === '' 32 32 && $image->getAttribute( 'role' ) !== 'presentation' ) { 33 33 -
accessibility-checker/tags/1.11.1/includes/rules/img_linked_alt_missing.php
r3080015 r3081378 22 22 23 23 // anchors with aria-label or title or valid node text. 24 if ( $a->getAttribute( 'aria-label' ) === '' && $a->getAttribute( 'title' ) === ''&& strlen( $a->plaintext ) <= 5 ) {24 if ( && strlen( $a->plaintext ) <= 5 ) { 25 25 26 26 $images = $a->find( 'img' ); -
accessibility-checker/tags/1.11.1/includes/rules/long_description_invalid.php
r3080015 r3081378 29 29 $valid_url = filter_var( $longdesc, FILTER_VALIDATE_URL ); 30 30 31 if ( $image->getAttribute( 'longdesc' ) === ''31 if ( $image->getAttribute( 'longdesc' ) === '' 32 32 || ! $valid_url 33 33 || ! $file_parts['extension'] -
accessibility-checker/tags/1.11.1/includes/rules/missing_title.php
r3080015 r3081378 23 23 } 24 24 if ( ( ! isset( $title ) || '' === $title->innertext || '-' === $title->innertext ) 25 && ( ! isset( $meta_title ) || ( $meta_title->hasAttribute( 'content' ) && ( $meta_title->getAttribute( 'content' ) === '' || strlen( $meta_title->getAttribute( 'content' ) ) <= 1 ) ) )25 && ( ! isset( $meta_title ) || ( $meta_title->hasAttribute( 'content' ) && ( $meta_title->getAttribute( 'content' ) === '' || strlen( $meta_title->getAttribute( 'content' ) ) <= 1 ) ) ) 26 26 ) { 27 27 return [ "Missing title tag or meta title tag - Post ID: $post->ID" ]; -
accessibility-checker/tags/1.11.1/readme.txt
r3080015 r3081378 4 4 Requires at least: 6.2 5 5 Tested up to: 6.5.2 6 Stable tag: 1.11. 06 Stable tag: 1.11. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 171 171 172 172 == Changelog == 173 174 175 176 177 173 178 174 179 = 1.11.0 = -
accessibility-checker/tags/1.11.1/vendor/autoload.php
r3080015 r3081378 3 3 // autoload.php @generated by Composer 4 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3::getLoader();25 return ComposerAutoloaderInit::getLoader(); -
accessibility-checker/tags/1.11.1/vendor/composer/ClassLoader.php
r3055547 r3081378 43 43 class ClassLoader 44 44 { 45 46 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 109 113 } 110 114 … … 150 154 /** 151 155 * @return string[] Array of classname => path 152 * @psalm- vararray<string, string>156 * @psalm- array<string, string> 153 157 */ 154 158 public function getClassMap() … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 562 } 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 558 585 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
accessibility-checker/tags/1.11.1/vendor/composer/InstalledVersions.php
r3055547 r3081378 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 25 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, }>}|array{}|null 30 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, }>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 97 99 foreach (self::getInstalled() as $installed) { 98 100 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || ; 100 102 } 101 103 } … … 118 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 121 { 120 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints($constraint); 121 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 124 … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, } 245 247 */ 246 248 public static function getRootPackage() … … 256 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 259 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, }>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, }>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, }>} $data 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, }>}> 315 317 */ 316 318 private static function getInstalled() … … 327 329 $installed[] = self::$installedByVendor[$vendorDir]; 328 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 330 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 335 self::$installed = $installed[count($installed) - 1]; … … 339 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 344 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 342 348 } else { 343 349 self::$installed = array(); 344 350 } 345 351 } 346 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 347 356 348 357 return $installed; -
accessibility-checker/tags/1.11.1/vendor/composer/autoload_classmap.php
r3080015 r3081378 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/tags/1.11.1/vendor/composer/autoload_namespaces.php
r3055547 r3081378 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/tags/1.11.1/vendor/composer/autoload_psr4.php
r3055547 r3081378 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/tags/1.11.1/vendor/composer/autoload_real.php
r3080015 r3081378 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd35 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname()); 29 spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader')); 30 30 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php'; 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit9acc56c47309c47dd8658e5013071dd3::getInitializer($loader)); 36 } else { 37 $map = require __DIR__ . '/autoload_namespaces.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->set($namespace, $path); 40 } 41 42 $map = require __DIR__ . '/autoload_psr4.php'; 43 foreach ($map as $namespace => $path) { 44 $loader->setPsr4($namespace, $path); 45 } 46 47 $classMap = require __DIR__ . '/autoload_classmap.php'; 48 if ($classMap) { 49 $loader->addClassMap($classMap); 50 } 51 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInitc9186e7167f863d6ad94be6f51ec2ba7::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
accessibility-checker/tags/1.11.1/vendor/composer/autoload_static.php
r3080015 r3081378 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 9acc56c47309c47dd8658e5013071dd37 class ComposerStaticInit 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 179 179 { 180 180 return \Closure::bind(function () use ($loader) { 181 $loader->prefixLengthsPsr4 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixLengthsPsr4;182 $loader->prefixDirsPsr4 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixDirsPsr4;183 $loader->prefixesPsr0 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixesPsr0;184 $loader->classMap = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$classMap;181 $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4; 182 $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4; 183 $loader->prefixesPsr0 = ComposerStaticInit::$prefixesPsr0; 184 $loader->classMap = ComposerStaticInit::$classMap; 185 185 186 186 }, null, ClassLoader::class); -
accessibility-checker/tags/1.11.1/vendor/composer/installed.php
r3080015 r3081378 1 1 <?php return array( 2 2 'root' => array( 3 3 4 'pretty_version' => 'dev-main', 4 5 'version' => 'dev-main', 6 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '4554894378eb4b4b0364ecd2689a676ad3d8e45b',9 'name' => 'equalizedigital/accesibility-checker',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => 'v1.12.0', 15 15 'version' => '1.12.0.0', 16 16 17 'type' => 'composer-plugin', 17 18 'install_path' => __DIR__ . '/./installers', 18 19 'aliases' => array(), 19 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',20 20 'dev_requirement' => false, 21 21 ), … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 25 26 'type' => 'library', 26 27 'install_path' => __DIR__ . '/../davechild/textstatistics', … … 28 29 0 => '1.0.x-dev', 29 30 ), 30 'reference' => '2276191cfe12eb083b2604faf1038dcb31820e8a',31 31 'dev_requirement' => false, 32 32 ), … … 34 34 'pretty_version' => 'dev-main', 35 35 'version' => 'dev-main', 36 36 37 'type' => 'library', 37 38 'install_path' => __DIR__ . '/../../', 38 39 'aliases' => array(), 39 'reference' => '4554894378eb4b4b0364ecd2689a676ad3d8e45b',40 40 'dev_requirement' => false, 41 41 ), -
accessibility-checker/trunk/accessibility-checker.php
r3080015 r3081378 11 11 * Plugin URI: https://a11ychecker.com 12 12 * Description: Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance. 13 * Version: 1.11. 013 * Version: 1.11. 14 14 * Author: Equalize Digital 15 15 * Author URI: https://equalizedigital.com … … 42 42 // Current plugin version. 43 43 if ( ! defined( 'EDAC_VERSION' ) ) { 44 define( 'EDAC_VERSION', '1.11. 0' );44 define( 'EDAC_VERSION', '1.11.' ); 45 45 } 46 46 -
accessibility-checker/trunk/admin/class-admin-notices.php
r3080015 r3081378 267 267 268 268 // first time if notice has never been shown wait 14 days. 269 if ( false === $edac_review_notice_reminder && false === $edac_review_notice) {269 if ( false === $edac_review_notice_reminder && ) { 270 270 // if option isn't set and plugin has been active for more than 14 days show notice. This is for current users. 271 271 if ( edac_days_active() > 14 ) { -
accessibility-checker/trunk/includes/rules/empty_button.php
r3080015 r3081378 28 28 foreach ( $buttons as $button ) { 29 29 if ( 30 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $button->plaintext ) ) === ''31 && $button->getAttribute( 'aria-label' ) === ''32 && $button->getAttribute( 'title' ) === ''30 31 && 32 && 33 33 ) { 34 34 … … 40 40 if ( 41 41 '' !== $error_code 42 && ( ! isset( $image[0] ) || trim( $image[0]->getAttribute( 'alt' ) ) === '')43 && ( ! isset( $input[0] ) || trim( $input[0]->getAttribute( 'value' ) ) === '')42 && ( ! isset( $image[0] ) || ) 43 && ( ! isset( $input[0] ) || ) 44 44 && ( 45 45 ! isset( $i[0] ) || 46 46 ( 47 ( trim( $i[0]->getAttribute( 'title' ) ) === '') &&48 ( trim( $i[0]->getAttribute( 'aria-label' ) ) === '')47 ( ) && 48 ( ) 49 49 ) 50 50 ) … … 57 57 // check inputs. 58 58 foreach ( $inputs as $input ) { 59 if ( $input->getAttribute( 'value' ) === '') {59 if ( ) { 60 60 $errors[] = $input->outertext; 61 61 } -
accessibility-checker/trunk/includes/rules/empty_heading_tag.php
r3080015 r3081378 27 27 $heading_code = $heading->outertext; 28 28 29 if ( ( str_ireplace( [ ' ', ' ', '-', '_' ], '', htmlentities( trim( $heading->plaintext ) ) ) === '' || str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $heading->plaintext ) ) === '' ) && ! preg_match( '#<img(\S|\s)*alt=(\'|\")(\w|\s)(\w|\s|\p{P}|\(|\)|\p{Sm}|~|`|’|\^|\$)+(\'|\")#', $heading_code ) ) { 29 if ( ( 30 empty( str_ireplace( [ ' ', ' ', '-', '_' ], '', htmlentities( trim( $heading->plaintext ) ) ) ) || 31 empty( str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $heading->plaintext ) ) ) 32 ) && 33 empty( $heading->getAttribute( 'aria-label' ) ) && 34 ! preg_match( 35 '#<img(\S|\s)*alt=(\'|\")(\w|\s)(\w|\s|\p{P}|\(|\)|\p{Sm}|~|`|’|\^|\$)+(\'|\")#', 36 $heading_code 37 ) 38 ) { 30 39 31 40 $errors[] = $heading_code; -
accessibility-checker/trunk/includes/rules/empty_link.php
r3080015 r3081378 23 23 24 24 if ( 25 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $link->plaintext ) ) === ''25 str_ireplace( [ ' ', ' ', '-', '_' ], '', trim( $link->plaintext ) ) === '' 26 26 && $link->hasAttribute( 'href' ) 27 && $link->getAttribute( 'aria-label' ) === ''28 && $link->getAttribute( 'title' ) === ''27 && 28 && 29 29 ) { 30 30 … … 46 46 47 47 $image = $link->find( 'img' ); 48 if ( ! $error && isset( $input[0] ) && trim( $image[0]->getAttribute( 'alt' ) ) === '') {48 if ( ! $error && isset( $input[0] ) && ) { 49 49 50 50 // The first image inside the link does not have an alt. … … 54 54 55 55 $input = $link->find( 'input' ); 56 if ( ! $error && isset( $input[0] ) && trim( $image[0]->getAttribute( 'value' ) ) === '') {56 if ( ! $error && isset( $input[0] ) && ) { 57 57 58 58 // The first input inside the link does not have a value. … … 63 63 $i = $link->find( 'i' ); 64 64 if ( ! $error && isset( $input[0] ) && 65 trim( $i[0]->getAttribute( 'title' ) ) === ''&&66 trim( $i[0]->getAttribute( 'aria-label' ) ) === ''65 && 66 67 67 ) { 68 68 -
accessibility-checker/trunk/includes/rules/iframe_missing_title.php
r3080015 r3081378 20 20 21 21 foreach ( $iframe_tags as $iframe ) { 22 if ( isset( $iframe ) && $iframe->getAttribute( 'title' ) === '' && $iframe->getAttribute( 'aria-label' ) === '') {22 if ( isset( $iframe ) && ) { 23 23 24 24 $iframecode = htmlspecialchars( $iframe->outertext ); -
accessibility-checker/trunk/includes/rules/img_alt_empty.php
r3080015 r3081378 28 28 && 'img' === $element->tag 29 29 && $element->hasAttribute( 'alt' ) 30 && $element->getAttribute( 'alt' ) === ''30 && $element->getAttribute( 'alt' ) === '' 31 31 && $element->getAttribute( 'role' ) !== 'presentation' 32 32 ) || ( … … 34 34 && $element->hasAttribute( 'alt' ) 35 35 && $element->getAttribute( 'type' ) === 'image' 36 && $element->getAttribute( 'alt' ) === ''36 && $element->getAttribute( 'alt' ) === '' 37 37 ) 38 38 ) { -
accessibility-checker/trunk/includes/rules/img_linked_alt_empty.php
r3080015 r3081378 22 22 23 23 // anchors with aria-label or title or valid node text. 24 if ( $a->getAttribute( 'aria-label' ) === '' && $a->getAttribute( 'title' ) === ''&& strlen( $a->plaintext ) <= 5 ) {24 if ( && strlen( $a->plaintext ) <= 5 ) { 25 25 26 26 $images = $a->find( 'img' ); … … 29 29 if ( isset( $image ) 30 30 && $image->hasAttribute( 'alt' ) 31 && $image->getAttribute( 'alt' ) === ''31 && $image->getAttribute( 'alt' ) === '' 32 32 && $image->getAttribute( 'role' ) !== 'presentation' ) { 33 33 -
accessibility-checker/trunk/includes/rules/img_linked_alt_missing.php
r3080015 r3081378 22 22 23 23 // anchors with aria-label or title or valid node text. 24 if ( $a->getAttribute( 'aria-label' ) === '' && $a->getAttribute( 'title' ) === ''&& strlen( $a->plaintext ) <= 5 ) {24 if ( && strlen( $a->plaintext ) <= 5 ) { 25 25 26 26 $images = $a->find( 'img' ); -
accessibility-checker/trunk/includes/rules/long_description_invalid.php
r3080015 r3081378 29 29 $valid_url = filter_var( $longdesc, FILTER_VALIDATE_URL ); 30 30 31 if ( $image->getAttribute( 'longdesc' ) === ''31 if ( $image->getAttribute( 'longdesc' ) === '' 32 32 || ! $valid_url 33 33 || ! $file_parts['extension'] -
accessibility-checker/trunk/includes/rules/missing_title.php
r3080015 r3081378 23 23 } 24 24 if ( ( ! isset( $title ) || '' === $title->innertext || '-' === $title->innertext ) 25 && ( ! isset( $meta_title ) || ( $meta_title->hasAttribute( 'content' ) && ( $meta_title->getAttribute( 'content' ) === '' || strlen( $meta_title->getAttribute( 'content' ) ) <= 1 ) ) )25 && ( ! isset( $meta_title ) || ( $meta_title->hasAttribute( 'content' ) && ( $meta_title->getAttribute( 'content' ) === '' || strlen( $meta_title->getAttribute( 'content' ) ) <= 1 ) ) ) 26 26 ) { 27 27 return [ "Missing title tag or meta title tag - Post ID: $post->ID" ]; -
accessibility-checker/trunk/readme.txt
r3080015 r3081378 4 4 Requires at least: 6.2 5 5 Tested up to: 6.5.2 6 Stable tag: 1.11. 06 Stable tag: 1.11. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 171 171 172 172 == Changelog == 173 174 175 176 177 173 178 174 179 = 1.11.0 = -
accessibility-checker/trunk/vendor/autoload.php
r3080015 r3081378 3 3 // autoload.php @generated by Composer 4 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3::getLoader();25 return ComposerAutoloaderInit::getLoader(); -
accessibility-checker/trunk/vendor/composer/ClassLoader.php
r3055547 r3081378 43 43 class ClassLoader 44 44 { 45 46 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 109 113 } 110 114 … … 150 154 /** 151 155 * @return string[] Array of classname => path 152 * @psalm- vararray<string, string>156 * @psalm- array<string, string> 153 157 */ 154 158 public function getClassMap() … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 562 } 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 558 585 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
accessibility-checker/trunk/vendor/composer/InstalledVersions.php
r3055547 r3081378 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 25 24 26 */ 25 27 class InstalledVersions … … 27 29 /** 28 30 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, }>}|array{}|null 30 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, }>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 97 99 foreach (self::getInstalled() as $installed) { 98 100 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || ; 100 102 } 101 103 } … … 118 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 121 { 120 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints($constraint); 121 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 124 … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, } 245 247 */ 246 248 public static function getRootPackage() … … 256 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 257 259 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, }>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, }>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, }>} $data 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, }>}> 315 317 */ 316 318 private static function getInstalled() … … 327 329 $installed[] = self::$installedByVendor[$vendorDir]; 328 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 330 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 335 self::$installed = $installed[count($installed) - 1]; … … 339 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 344 if (substr(__DIR__, -8, 1) !== 'C') { 341 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 342 348 } else { 343 349 self::$installed = array(); 344 350 } 345 351 } 346 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 347 356 348 357 return $installed; -
accessibility-checker/trunk/vendor/composer/autoload_classmap.php
r3080015 r3081378 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/trunk/vendor/composer/autoload_namespaces.php
r3055547 r3081378 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/trunk/vendor/composer/autoload_psr4.php
r3055547 r3081378 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(); 6 6 $baseDir = dirname($vendorDir); 7 7 -
accessibility-checker/trunk/vendor/composer/autoload_real.php
r3080015 r3081378 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd35 class ComposerAutoloaderInit 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 9acc56c47309c47dd8658e5013071dd3', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInit', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname()); 29 spl_autoload_unregister(array('ComposerAutoloaderInit', 'loadClassLoader')); 30 30 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php'; 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit9acc56c47309c47dd8658e5013071dd3::getInitializer($loader)); 36 } else { 37 $map = require __DIR__ . '/autoload_namespaces.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->set($namespace, $path); 40 } 41 42 $map = require __DIR__ . '/autoload_psr4.php'; 43 foreach ($map as $namespace => $path) { 44 $loader->setPsr4($namespace, $path); 45 } 46 47 $classMap = require __DIR__ . '/autoload_classmap.php'; 48 if ($classMap) { 49 $loader->addClassMap($classMap); 50 } 51 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInitc9186e7167f863d6ad94be6f51ec2ba7::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
accessibility-checker/trunk/vendor/composer/autoload_static.php
r3080015 r3081378 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 9acc56c47309c47dd8658e5013071dd37 class ComposerStaticInit 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 179 179 { 180 180 return \Closure::bind(function () use ($loader) { 181 $loader->prefixLengthsPsr4 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixLengthsPsr4;182 $loader->prefixDirsPsr4 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixDirsPsr4;183 $loader->prefixesPsr0 = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$prefixesPsr0;184 $loader->classMap = ComposerStaticInit 9acc56c47309c47dd8658e5013071dd3::$classMap;181 $loader->prefixLengthsPsr4 = ComposerStaticInit::$prefixLengthsPsr4; 182 $loader->prefixDirsPsr4 = ComposerStaticInit::$prefixDirsPsr4; 183 $loader->prefixesPsr0 = ComposerStaticInit::$prefixesPsr0; 184 $loader->classMap = ComposerStaticInit::$classMap; 185 185 186 186 }, null, ClassLoader::class); -
accessibility-checker/trunk/vendor/composer/installed.php
r3080015 r3081378 1 1 <?php return array( 2 2 'root' => array( 3 3 4 'pretty_version' => 'dev-main', 4 5 'version' => 'dev-main', 6 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '4554894378eb4b4b0364ecd2689a676ad3d8e45b',9 'name' => 'equalizedigital/accesibility-checker',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => 'v1.12.0', 15 15 'version' => '1.12.0.0', 16 16 17 'type' => 'composer-plugin', 17 18 'install_path' => __DIR__ . '/./installers', 18 19 'aliases' => array(), 19 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',20 20 'dev_requirement' => false, 21 21 ), … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 25 26 'type' => 'library', 26 27 'install_path' => __DIR__ . '/../davechild/textstatistics', … … 28 29 0 => '1.0.x-dev', 29 30 ), 30 'reference' => '2276191cfe12eb083b2604faf1038dcb31820e8a',31 31 'dev_requirement' => false, 32 32 ), … … 34 34 'pretty_version' => 'dev-main', 35 35 'version' => 'dev-main', 36 36 37 'type' => 'library', 37 38 'install_path' => __DIR__ . '/../../', 38 39 'aliases' => array(), 39 'reference' => '4554894378eb4b4b0364ecd2689a676ad3d8e45b',40 40 'dev_requirement' => false, 41 41 ),
Note: See TracChangeset
for help on using the changeset viewer.