* looking for arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-667 to compare with
* comparing to arch@arch.thinkmo.de--2003-archives/moin--main--1.3--patch-667
M  MoinMoin/formatter/text_html.py
M  MoinMoin/Page.py
M  MoinMoin/multiconfig.py
M  MoinMoin/wikiutil.py

* modified files

--- orig/MoinMoin/Page.py
+++ mod/MoinMoin/Page.py
@@ -61,7 +61,10 @@
         self._raw_body = None
         self._raw_body_modified = 0
         self.hilite_re = None
-        self.language = None
+        self.language = None        
+        self.master_page = keywords.get('master_page')
+        keys = self.cfg.accesskeys
+        self.accesskey = keys.get(self.master_page, keys.get(page_name))
 
         self.reset()
 
@@ -826,6 +829,10 @@
         if not self.exists():
             kw['css_class'] = 'nonexistent'
 
+        # Add accesskey
+        if self.accesskey:
+            kw['accesskey'] = self.accesskey
+        
         link = wikiutil.link_tag(request, url, wikiutil.escape(text),
                                  formatter=getattr(self, 'formatter', None), **kw)
 


--- orig/MoinMoin/formatter/text_html.py
+++ mod/MoinMoin/formatter/text_html.py
@@ -257,10 +257,10 @@
             # unescaped=1 was changed to 0 to make interwiki links with pages with umlauts (or other non-ascii) work
 
     def url(self, on, url=None, css=None, **kw):
-        """
-            Keyword params:
-                title - title attribute
-                ... some more (!!! TODO) 
+        """ Render html url link
+        
+        @keyword title: html title attribute
+        @keyword accesskey: html accesskey attribute
         """
         if url is not None:
             url = wikiutil.mapURL(self.request, url)
@@ -279,6 +279,11 @@
             str = '%s class="%s"' % (str, css)
         if title:
             str = '%s title="%s"' % (str, title)
+        
+        accesskey = kw.get('accesskey')
+        if accesskey:
+            str = '%s accesskey="%s"' % (str, accesskey)
+            
         str = '%s href="%s">' % (str, wikiutil.escape(url, 1))
 
         type = kw.get('type', '')


--- orig/MoinMoin/multiconfig.py
+++ mod/MoinMoin/multiconfig.py
@@ -270,6 +270,20 @@
     
     SecurityPolicy = None
 
+    # Accessibility
+    accesskeys = {
+        u'FrontPage': '1',
+        u'RecentChanges': '2',
+        u'SiteMap': '3',
+        u'FindPage': '4',
+        u'FrequentlyAskedQuestions': '5',
+        u'HelpContents': '6',
+        u'ComplaintsProcedure': '7',
+        u'WikiLicense': '8',
+        u'WikiAdmin': '9',
+        u'HelpOnAccesskeys': '0',
+    }
+
     def __init__(self, siteid):
         """ Init Config instance """
         self.siteid = siteid
@@ -319,11 +333,17 @@
             if not getattr(self, name, None):
                 setattr(self, name, os.path.join(data_dir, dirname))
         
-        # post process navibar
+        # Expand variables in navibar
         # we replace any string placeholders with config values
         # e.g u'%(page_front_page)s' % self
         self.navi_bar = [elem % self for elem in self.navi_bar]
-
+        
+        # Update accesskey to actual front page
+        keys = self.accesskeys
+        if self.page_front_page != u'FrontPage' and u'FrontPage' in keys:
+            keys[self.page_front_page] = keys[u'FrontPage']
+            del keys[u'FrontPage']
+        
     def _config_check(self):
         """ Check namespace and warn about unknown names
         


--- orig/MoinMoin/wikiutil.py
+++ mod/MoinMoin/wikiutil.py
@@ -480,7 +480,7 @@
             if i18n_page.exists():
                 pageobj = i18n_page
         else:
-            i18n_page = Page(request, i18n_name)
+            i18n_page = Page(request, i18n_name, master_page=pagename)
             if i18n_page.exists():
                 pageobj = i18n_page
 
@@ -871,6 +871,7 @@
     @param formatter: the formatter object to use
     @keyword on: opening/closing tag only
     @keyword attrs: additional attrs (HTMLified string)
+    @keyword accesskey: html accesskey attribute
     @rtype: string
     @return: formatted link tag
     """
@@ -892,6 +893,11 @@
         attrs += ' ' + kw['attrs']
     if css_class:
         attrs += ' class="%s"' % css_class
+    
+    accesskey = kw.get('accesskey')
+    if accesskey:
+        attrs += ' accesskey="%s"' % accesskey
+
     result = '<a%s href="%s/%s">' % (attrs, request.getScriptname(), params)
     if on:
         return result



