Jquery IE10中的ARIA属性

Jquery IE10中的ARIA属性,jquery,internet-explorer,internet-explorer-10,wai-aria,Jquery,Internet Explorer,Internet Explorer 10,Wai Aria,我试图使用jQuery在元素上设置aria autocomplete属性。但是,当IE10在IE5怪癖模式或IE7标准模式下运行时,会产生未找到成员错误 <input type="textbox" id="test" />​ $('#test').attr({"aria-autocomplete": "list"});​ ​ $('#test').attr({“aria autocomplete”:“list”});​ 看这个演示 我尝试过这里定义的各种其他ARIA属性: 有些

我试图使用jQuery在元素上设置
aria autocomplete
属性。但是,当IE10IE5怪癖模式IE7标准模式下运行时,会产生
未找到成员
错误

<input type="textbox" id="test" />​
$('#test').attr({"aria-autocomplete": "list"});​
​
$('#test').attr({“aria autocomplete”:“list”});​
看这个演示

我尝试过这里定义的各种其他ARIA属性:

有些会产生相同的错误,有些则不会

我无法重现IE9中的错误

这是IE10中的一个bug吗?jQuery?还是有其他我不明白的原因

这是IE10浏览器在兼容模式下的已知错误。请向上投票此错误通知单,以增加其被修复的可能性。该票证由jQuery团队提交

您是否在真正的IE7中尝试过您的代码示例?我尝试了使用browserstack(WinXP/IE7)的JSFIDLE,该示例运行正常,没有出现错误


如果您使用兼容模式模拟测试IE7,那么好消息是使用本机IE7工作正常。坏消息是IE10兼容模式中有一个bug

这就是我的解决方案。在您正在使用的Jquery版本中,在我的cas(
Jquery-1.7.2.js
)中,第2764行周围有一个部分如下所示:

// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
nodeHook = jQuery.valHooks.button = {
    get: function( elem, name ) {
        var ret;
        ret = elem.getAttributeNode( name );
        return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
            ret.nodeValue :
            undefined;
    },
    set: function( elem, value, name ) {
        // Set the existing or create a new attribute node
        var ret = elem.getAttributeNode( name );
        if ( !ret ) {
            ret = document.createAttribute( name );
            elem.setAttributeNode( ret );
        }
        return ( ret.nodeValue = value + "" );
    }
};
根据,这是IE10在IE7模式下的兼容性问题。解决方案是在set函数中更改返回变量:

 return ( ret.nodeValue = value + "" );
//for:
elem.setAttribute(name, value + ""); 
return (ret.value);

jQuery不支持怪癖模式。我不确定IE10中的IE7标准模式。我得调查一下,谢谢你,以利亚。我已经把这个错误升级了。我只使用IE10开发工具测试了IE7,所以应该没问题。@Elijah_Manor-这个链接断了。你介意再给我一张票吗。?。?Thanks@johntrepreneur-链接没有断开。如果你看不到,你需要在网站上注册并加入IE反馈计划。关于jQuery错误的评论使您似乎只需要注册。链接对我不起作用:找不到您请求的内容,或者您没有查看该内容的权限。Microsoft已推迟对此问题的任何修复。由于IE-11已经发布,它可能会被永远推迟。。。