Fix code quality issues: add ESLint config to Cypress files, update documentation, improve HTML accessibility

This commit is contained in:
2025-04-22 15:11:56 +01:00
parent 3ca2fe58fa
commit f48276cc58
7 changed files with 32 additions and 22 deletions

View File

@@ -21,6 +21,6 @@
</style>
</head>
<body>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=11" title="WordPress Playground Single Site Environment"></iframe>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/blueprint.json&_t=1" title="WordPress Playground Single Site Environment"></iframe>
</body>
</html>

View File

@@ -21,6 +21,6 @@
</style>
</head>
<body>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=24" title="WordPress Playground Multisite Environment"></iframe>
<iframe src="https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/main/playground/multisite-blueprint.json&_t=1" title="WordPress Playground Multisite Environment"></iframe>
</body>
</html>

View File

@@ -39,12 +39,18 @@
</head>
<body>
<div class="buttons">
<button onclick="loadSingleSite()">Single Site</button>
<button onclick="loadMultisite()">Multisite</button>
<button type="button" id="singleSiteBtn">Single Site</button>
<button type="button" id="multisiteBtn">Multisite</button>
</div>
<iframe id="playground" src="about:blank" title="WordPress Playground Test Environment"></iframe>
<script>
// Use unobtrusive event listeners instead of inline handlers
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('singleSiteBtn').addEventListener('click', loadSingleSite);
document.getElementById('multisiteBtn').addEventListener('click', loadMultisite);
});
function loadSingleSite() {
document.getElementById('playground').src = "https://playground.wordpress.net/?blueprint=" + encodeURIComponent(JSON.stringify(singleSiteBlueprint));
}