使用内置的Chrome Lighthouse在WP网站上运行可访问性审核,由于没有关联的标签,因此注册字段无效。我以前曾遇到过这个问题,但我不明白为什么它认为它没有关联。我可以通过直接在aria-label标签上添加标签来使其通过,input但我不必这样做。
这是从Subscribe2创建的代码片段
<label for="s2email">Your email:</label>
<br>
<input type="text" name="email" id="s2email" value="Enter email address..." size="20" onfocus="if (this.value === 'Enter email address...') {this.value = '';}" onblur="if (this.value === '') {this.value = 'Enter email address...';}">
Run Code Online (Sandbox Code Playgroud)
可以在这里找到:https://blog.collaborative.org/
我浪费了很多时间在正在建立的网站上实施多个音频录制选项,但是每个选项只能在Chrome中运行,只能在Firefox中运行,而不能同时在Safari中运行,而在iOS上均不工作。
该网站需要允许用户记录其消息并将其保存为表单状态以供提交。
我正在阅读的所有当前文章都有几个月的历史,并提到iOS不会/将很快支持它。我已经尝试过在iOS上使用移动Chrome浏览器,但仍然无法正常运行。
有没有人找到一种简单地在浏览器以及移动网站中录制音频的方法?
我尝试过的事情:
当前使用适用于Chrome和Firefox的以下代码。
的HTML
<audio controls src="" id="audio"></audio>
<a class="button" id="record">Record</a>
<input type="hidden" id="audiofile" name="audiofile" value="" aria-hidden="true"/>
使用Francium语音库:
Java脚本
// Audio Recording for Phone Calls
$(document).on("click", "#record:not(.stop)", function(){
elem = $(this);
$("#audio").attr("src","");
$("#audiofile").val("");
Fr.voice.record($("#live").is(":checked"), function(){
elem.addClass("stop");
});
elem.html("Stop <label id='minutes'>00</label>:<label id='seconds'>00</label>");
var minutesLabel = document.getElementById("minutes");
var secondsLabel = document.getElementById("seconds");
var totalSeconds = 0;
setInterval(setTime, 1000);
function setTime() {
++totalSeconds;
secondsLabel.innerHTML = pad(totalSeconds % 60);
minutesLabel.innerHTML …Run Code Online (Sandbox Code Playgroud)